Max Execution Time controls how long a PHP script can run before timing out. Increase this for resource-intensive operations like imports, exports, and large database tasks that would otherwise fail.

What this feature does

PHP enforces a maximum execution time to prevent runaway scripts from consuming unlimited server resources. By default, this is set to 30 seconds on most servers. If a script takes longer than this limit, PHP kills it with a fatal timeout error. This becomes a problem for tasks that legitimately need more time: large file imports, database migrations, bulk operations, and maintenance tasks.

This setting increases the maximum execution time for your WordPress scripts. AdminEase applies this across multiple layers: PHP itself (ini_set and set_time_limit), your wp-config.php file, and your web server configuration via .htaccess. You can set a custom timeout in seconds, from 1 second up to 3600 (one hour), or use -1 for unlimited.

Shared hosting server limits

Many shared hosting providers enforce server-level timeout limits (often 120 seconds) that cannot be overridden by PHP configuration alone. If you increase the timeout to 300 seconds but operations still fail after 120 seconds, your server has a hard limit. Contact your hosting provider about increasing server-level timeout settings (such as ExtAppTimeout or ConnectionTimeout), or consider upgrading to a VPS or dedicated server.

How to enable it

  1. Open AdminEase and navigate to Performance. Click AdminEase in the WordPress admin menu, then switch to the Performance tab.
  2. Enter your desired max execution time. In the Max Execution Time field, enter the number of seconds. For example, 300 for five minutes, or -1 for no limit (use with caution).
  3. Save settings. AdminEase applies the setting to PHP, wp-config.php, and server configuration immediately. Changes take effect on the next page load.
  4. Test your long-running operation. Try the import, backup, or bulk operation that was timing out. If it now completes, you've found your target timeout value.

Settings reference

Setting What it does Default
Max Execution Time The maximum number of seconds a PHP script can run before timing out. Enter a positive integer (1, 30, 300, etc.), or -1 for unlimited time. Common values: 60 (1 min), 300 (5 min), 600 (10 min). Minimum is -1 (unlimited), maximum is 3600 (1 hour). On LiteSpeed servers, this also applies directives to .htaccess. 30 seconds (default PHP timeout)

What happens behind the scenes

Multiple layers of application

AdminEase applies the timeout at runtime and in configuration files so it takes effect everywhere:

  • Runtime (PHP): Uses ini_set('max_execution_time', $value) and set_time_limit($value) to immediately extend the timeout for the current request and all subsequent requests.
  • wp-config.php: AdminEase writes a managed block to persist the setting across all requests, even if PHP configuration is reset.
  • LiteSpeed servers: For LiteSpeed web servers, AdminEase also writes timeout directives to .htaccess to handle FastCGI-level timeouts that might otherwise interrupt long operations.

This multi-layer approach ensures your timeout applies consistently, regardless of your server setup or which component would otherwise enforce a lower limit.

Troubleshooting

I set the timeout to 300 seconds, but operations still fail at 120 seconds

This is almost always a server-level limit imposed by your hosting provider's web server configuration, not by PHP. Your hosting provider's FastCGI, PHP-FPM, or load balancer enforces a hard timeout that AdminEase cannot override. Contact your host and ask them to increase ExtAppTimeout, ConnectionTimeout, or ProxyTimeout in their server configuration. If they can't or won't, you may need to upgrade to a plan with higher limits or switch to a different provider.

What timeout should I use?

Start with 300 seconds (5 minutes) for most import or backup operations. If operations complete quickly, you can lower it. If they're still timing out, try 600 (10 minutes) or higher. Monitor your error logs to see where timeouts occur. Set it just high enough to complete your operations; unnecessarily high timeouts can mask performance problems. For most sites, 300-600 seconds is reasonable; over 1800 (30 min) suggests you need to split the operation into batches or upgrade your server.

Is -1 (unlimited) safe to use?

Setting -1 removes the timeout entirely, which prevents "out of time" errors but can mask runaway scripts that consume 100% CPU. Use unlimited timeout only temporarily during large migrations or imports, then set it back to a reasonable value (300-600). If a script runs indefinitely, you have a bigger problem that unlimited timeout will only hide. Always investigate what's making scripts run so long.

I'm on a shared hosting provider and they won't increase the timeout

Some shared hosts don't allow timeout customization on their standard plans. Your options are: (1) Upgrade to a higher tier that allows configuration, (2) Switch to a different host that's more flexible, or (3) Break your operation into smaller chunks. For example, instead of importing 10,000 records at once, import 100 at a time in a loop. AdminEase's timeout applies to the entire PHP process, but if your provider has a hard server limit, there's no workaround without changing providers.