Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A WordPress fatal error such as “Maximum execution time of 30 seconds exceeded” means a PHP request ran longer than the execution limit imposed by your server. First preserve the complete error and identify the operation and file path involved. Then isolate a plugin, theme, query, or maintenance task that is taking too long. Only after that should you raise PHP’s max_execution_time—and only through a configuration method your host supports.

What the error means

PHP’s max_execution_time limits how long a script may execute. PHP documents a default of 30 seconds when no other value is set, but your host, PHP handler, or managed platform may use a different value. The duration in your message—30, 60, or another number—is the limit that applied to that request, not a universal WordPress setting.

The timeout can be the symptom of a slow database query, an endless or unusually large loop, a large import, backup or image-optimization job, a plugin or theme conflict, or server resource pressure. Increasing the limit gives legitimate work more time; it does not explain why the work is slow.

See the WordPress guidance on common WordPress errors and PHP’s set_time_limit() documentation for the underlying directives and behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Capture the exact failure before changing settings

  1. Copy the complete fatal-error line. Include the timeout duration, file path, line number, and message. Look in the server’s PHP error log or the WordPress recovery email.
  2. Note what you were doing. Record whether it happened during a page load, plugin or theme update, import, backup, image optimization, scheduled task, or a large settings save.
  3. Treat the file path as a lead, not proof. A path under wp-content/plugins/ or wp-content/themes/ shows where PHP was executing when it stopped; the component may have triggered a slow query or interaction elsewhere.
  4. Avoid repeated production retries. Re-running an expensive import or backup can increase load and create duplicate or partial work. Preserve a backup and reproduce only when necessary.

WordPress recommends using logs to understand PHP errors. The log entry and the triggering action together are more useful than the timeout number alone.

2. Use Recovery Mode when WordPress offers it

For an eligible fatal error during a normal page load, WordPress may send a recovery email with a special login link. Recovery Mode can pause the faulty plugin or theme for your administrator session so you can reach the dashboard, inspect the notice, and deactivate or repair the component.

  1. Open the recovery link from the email and sign in.
  2. Read the dashboard notice identifying the paused extension or theme.
  3. Deactivate, update, replace, or configure that component as appropriate.
  4. Exit Recovery Mode and test the site in a normal session.

Recovery Mode is an access and diagnosis aid, not a timeout-setting change. It does not activate for errors occurring in WP-Cron or other background tasks. Details are in the WordPress Recovery Mode documentation.

3. Isolate a plugin or theme

When the log points to an extension

On a staging copy, or during a controlled maintenance window, deactivate plugins one at a time and repeat the specific action that failed. If the timeout disappears, reactivate other plugins and test the suspected one on its own. Check for an available update, a documented batch-size setting, or support guidance before leaving it disabled.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When the log points to a theme

Temporarily switch to a current default WordPress theme where that is safe, then repeat the failing page load or action. If the problem stops, inspect the theme’s custom code, integrations, and update status. Do not edit WordPress core files to bypass the error; correct the extension or custom code responsible for the work.

If the dashboard is inaccessible

Use the manual plugin-deactivation method described in WordPress’s common-errors guide, or ask your host to disable the suspected extension. Make a backup before renaming directories or changing production files, and restore normal names after testing.

4. Raise max_execution_time only when the task genuinely needs it

WordPress documents these example configurations:

; php.ini
max_execution_time = 60
# .htaccess example documented by WordPress
php_value max_execution_time 60

These are options, not universal instructions. The supported method depends on your PHP handler, web server, hosting plan, and provider policy. Back up .htaccess before editing it. A directive rejected by your stack can produce a server error or simply have no effect.

  1. Confirm the current PHP version and execution limit in your host control panel or a protected diagnostic page.
  2. Ask the host which configuration file or control-panel setting governs PHP for the affected site.
  3. Change the value modestly, such as from 30 to 60 seconds, if the host approves it.
  4. Repeat only the failed operation and monitor the PHP and web-server logs.
  5. Revert the change if it does not address the cause or creates resource pressure.

On shared or managed hosting, WordPress explicitly advises asking the provider to increase the maximum execution time when you are unsure or cannot make the change. Do not copy very high values from forum posts without understanding the server’s capacity and request limits.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Check limits beyond PHP

PHP may not be the last component allowed to run. A web server, PHP-FPM pool, reverse proxy, CDN, or managed platform can impose a shorter request timeout. If that upstream limit is lower than max_execution_time, raising the PHP value will not keep the request alive.

Ask your host which limits apply to the site and whether they can see the termination reason. Include web-server, proxy or CDN, PHP-FPM, and platform-level request limits in that conversation. WordPress discusses the interaction between these settings in its PHP Optimization guidance.

6. Match the remedy to the failing workload

Approach What it addresses Who controls it Important limitation
Log review and reproduction Identifies the operation and code active at the timeout Site owner and host The named file is a lead, not conclusive proof of root cause
Plugin or theme isolation Conflicts, faulty extensions, and custom code Site administrator or developer Requires controlled testing and may temporarily remove functionality
Increase max_execution_time Legitimate PHP work that needs more time Site owner if permitted; otherwise the host Does not fix slow queries, loops, or resource shortages
Adjust surrounding request limits Web-server, PHP-FPM, proxy, CDN, or platform termination Usually the hosting provider Values must be compatible across the request path
Recovery Mode Restores admin access for certain page-load fatals WordPress and the administrator Does not cover WP-Cron or background-task failures
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

7. Handle large imports and background work safely

If the timeout occurs only during a large import, backup, migration, or maintenance job, determine whether the plugin supports smaller batches or an official background or command-line mode. Follow that plugin’s and host’s documentation rather than inserting arbitrary commands. A batch or supported background process can reduce the amount of work in one web request, but it does not make a broken loop or failing query correct.

For recurring scheduled failures, inspect the task’s logs and the host’s cron or queue configuration. Because Recovery Mode does not activate for background work, diagnosis must come from those logs and the task’s own controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common mistakes to avoid

  • Assuming every site uses 30 seconds: use the duration in your actual error and confirm the effective server value.
  • Changing only PHP: a shorter web-server or proxy timeout can still end the request first.
  • Setting an extreme limit: long-running requests consume workers and can worsen load for other visitors.
  • Blaming the file named in the fatal error: it may be the point where PHP stopped, not the original cause.
  • Editing core files: core changes are overwritten and conceal the extension or custom-code problem.
  • Repeatedly retrying an expensive job: use a backup or staging copy and verify whether partial work was created.

When to contact your hosting provider

Contact support when the setting is locked, your change has no effect, the site uses shared or managed hosting, or the logs show PHP-FPM, web-server, proxy, or resource-limit terminations. Provide the full fatal-error line, timestamp and timezone, URL or task that failed, recent changes, and the relevant log excerpt. Ask which component ended the request and which configuration method and maximum value they support.

The Bottom Line

Find the failing operation first, isolate the plugin, theme, query, or batch causing the delay, and then raise max_execution_time only if the work is legitimate and your host supports it. A PHP timeout increase cannot overcome a shorter upstream limit or repair inefficient code.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.