A WordPress maximum execution time exceeded error happens when a PHP process runs longer than the server allows and is automatically stopped.
You may see an error such as “Maximum execution time of 30 seconds exceeded” while updating WordPress, installing a plugin, importing content, creating a backup, optimizing images, or running another resource-heavy task.
The problem may be caused by an unusually demanding plugin, a large database operation, a slow external request, insufficient hosting resources, or a PHP execution-time limit that is too low for the task.
The best fix is not always to increase the timeout. First determine why the process is taking so long.
QUICK ANSWER
If WordPress reports that the maximum execution time was exceeded, identify which action triggers the error first. Temporarily disable the plugin involved, check PHP and server logs, review CPU and PHP worker usage, reduce large imports or backup jobs, and update outdated plugins or themes. If the operation is legitimate and simply needs more time, increase max_execution_time through your hosting PHP settings, php.ini, or hosting support. Avoid setting an unlimited execution time on a production site.
What Does Maximum Execution Time Exceeded Mean?
PHP servers can limit how long a script is allowed to run.
This protects the server from a broken or inefficient process running indefinitely.
A common error looks like:
Fatal error: Maximum execution time of 30 seconds exceeded
The number may be:
- 30 seconds,
- 60 seconds,
- 120 seconds,
- 300 seconds,
- or another value chosen by your hosting provider.
The error does not automatically mean WordPress itself is broken.
It means one PHP request took longer than the allowed execution period.
1. Identify Which WordPress Action Triggers the Error
Do not increase PHP limits before identifying what is actually taking too long.
Think about what you were doing immediately before the error appeared.
Common triggers include:
- updating a plugin,
- updating WordPress core,
- installing a large theme,
- running a backup,
- restoring a website,
- importing WooCommerce products,
- optimizing images,
- running a malware scan,
- regenerating thumbnails,
- or performing database optimization.
If normal pages load quickly and only one specific operation fails, focus on that operation rather than changing the entire server.
If many unrelated WordPress actions are timing out, investigate hosting resources, PHP workers, database performance, and server configuration.
2. Temporarily Disable the Plugin Causing the Long-Running Process
Plugins are a common source of execution-time errors because some perform heavy background processing.
If the problem began after installing or updating a plugin, deactivate that plugin first.
Then repeat the same WordPress action.
Pay particular attention to:
- backup plugins,
- security scanners,
- image optimization plugins,
- WooCommerce extensions,
- import/export tools,
- SEO crawlers,
- database optimization plugins,
- and migration tools.
If the error disappears after disabling one plugin, check whether that plugin:
- has an update available,
- offers batch-size controls,
- supports background processing,
- has a known compatibility problem,
- or requires more server resources than your hosting plan provides.
If You Cannot Access wp-admin
Use your hosting file manager or FTP/SFTP.
Navigate to:
/wp-content/plugins/
Temporarily rename the suspected plugin directory.
Then reload the site.
If the website becomes accessible again, restore the directory name and troubleshoot the plugin before activating it again.
3. Check PHP max_execution_time
The PHP setting that commonly controls script execution time is:
max_execution_time
You may be able to view this value through:
Tools → Site Health → Info → Server
or your hosting control panel.
A server may use a configuration such as:
max_execution_time = 30
For heavier WordPress administrative tasks, a higher value such as:
max_execution_time = 120
or:
max_execution_time = 300
may be more appropriate depending on the hosting environment and task.
Do not assume that a larger value is always better.
If a normal WordPress request requires several minutes, investigate why it is slow before simply extending the timeout.
4. Increase Execution Time Through Your Hosting PHP Settings
The safest method on many managed WordPress hosts is to use the hosting control panel.
Look for settings such as:
- PHP Configuration,
- PHP Options,
- PHP Settings,
- MultiPHP INI Editor,
- or Advanced PHP Configuration.
Find:
max_execution_time
and increase it to a reasonable value supported by your host.
After saving the setting:
- clear server or WordPress cache if necessary,
- reload WordPress,
- confirm that the new value is active,
- and repeat the failed operation once.
If the value immediately returns to the previous setting, your hosting provider may enforce a maximum execution limit.
Contact support rather than repeatedly editing configuration files.
5. Change php.ini or .user.ini When Supported
If your hosting environment permits local PHP configuration, you may be able to use:
php.ini
or:
.user.ini
A typical setting is:
max_execution_time = 300
The exact location and supported configuration method vary by hosting provider.
After changing the file, PHP may take some time to reload the new configuration.
Check the active value afterward rather than assuming the change worked.
Do not create multiple conflicting PHP configuration files throughout your WordPress directories.
If your host manages PHP centrally, local files may be ignored.
6. Reduce the Size of Heavy WordPress Jobs
Sometimes the correct solution is to make the operation smaller rather than allowing it to run longer.
Large Imports
Instead of importing thousands of products or posts in one request, divide the data into smaller batches.
Image Optimization
Process images in smaller groups instead of optimizing the entire Media Library at once.
Backups
Exclude unnecessary cache directories, old backups, and temporary files.
Database Operations
Avoid processing an extremely large database table in one browser request when the plugin supports background or batch processing.
Smaller jobs can reduce:
- execution time,
- memory usage,
- CPU spikes,
- PHP worker usage,
- and the chance of gateway timeouts.
If a long-running process produces an HTTP 504 response instead, see our WordPress 504 Gateway Timeout? 8 Fixes guide.
7. Check PHP Memory, CPU, Database, and PHP Workers
A script may exceed its execution limit because the server is processing it unusually slowly.
Open your hosting resource dashboard and check:
- CPU usage,
- RAM usage,
- PHP memory,
- PHP workers,
- database load,
- entry processes,
- and account resource limits.
If CPU usage is constantly at the hosting limit, increasing max_execution_time may simply allow an overloaded process to run longer.
Also inspect your PHP logs.
If you see:
Allowed memory size exhausted
you have a memory problem in addition to or instead of an execution-time problem.
See our WordPress Memory Exhausted Error? 7 Fixes guide.
If the server becomes temporarily unavailable during heavy tasks, see our WordPress 503 Service Unavailable? 8 Fixes guide.
8. Check WordPress, PHP, and Server Logs
If you do not know why the request is slow, logs can identify the code running when the timeout occurs.
Useful logs include:
- PHP error logs,
- WordPress debug logs,
- Apache logs,
- Nginx logs,
- PHP-FPM logs,
- database slow-query logs,
- and hosting resource reports.
Reproduce the error once and note the exact time.
Then look for a message that references:
- a plugin file,
- a theme file,
- a PHP function,
- a database query,
- an external API call,
- or a background process.
If WordPress debugging is required, an administrator can temporarily configure:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
WordPress can then write debugging information to:
/wp-content/debug.log
Do not leave unnecessary debugging enabled on a production website after the problem is resolved.
Why Does Maximum Execution Time Exceeded Happen During Plugin Updates?
A plugin update has to download, extract, replace, and sometimes migrate files or database data.
The process can take longer when:
- the plugin package is large,
- the server is slow,
- disk operations are delayed,
- PHP workers are busy,
- or the update performs database changes.
If only one plugin repeatedly times out during updates, investigate that plugin specifically.
If all plugin and WordPress updates fail, see our WordPress Update Failed? 8 Fixes guide.
Why Does the Error Appear During WordPress Imports?
Imports can require hundreds or thousands of database writes.
The larger the file, the longer a single process may need to run.
When possible:
- split the import file,
- reduce the batch size,
- remove unnecessary data,
- and run large jobs during lower-traffic periods.
If the upload itself is rejected before the import begins, check whether the server returns HTTP 413.
See our WordPress 413 Request Entity Too Large? 8 Fixes guide.
Why Does Backup Creation Time Out?
A complete backup may involve:
- reading thousands of files,
- compressing those files,
- exporting the database,
- and transferring the archive to remote storage.
This can exceed short PHP execution limits.
Look for backup-plugin options that support:
- background processing,
- smaller archive chunks,
- incremental backups,
- or server-level scheduling.
Also remove old backup archives stored inside the site if the plugin is repeatedly backing up its own previous backups.
Maximum Execution Time vs 504 Gateway Timeout
These problems can occur together but are different.
Maximum execution time exceeded: PHP stops a script because it has run longer than PHP allows.
504 Gateway Timeout: a gateway or proxy stops waiting because the upstream server did not respond in time.
A slow PHP process can eventually cause both errors, depending on which limit is reached first.
Maximum Execution Time vs cURL Error 28
These are also different timeout types.
Maximum execution time exceeded concerns the total PHP script execution period.
cURL error 28 usually concerns an HTTP request that waited too long for a network response.
If WordPress specifically reports a connection timeout or cURL error 28, see our WordPress cURL Error 28? 8 Fixes guide.
Can a Theme Cause Maximum Execution Time Errors?
Yes.
A theme can contain:
- slow PHP code,
- inefficient loops,
- large database queries,
- external API calls,
- or page-builder integrations that require extensive processing.
If disabling plugins does not solve the problem, temporarily activate a standard lightweight theme.
Then repeat the failing operation.
If the error disappears, investigate the theme or custom child-theme code.
Should You Set max_execution_time to 0?
Usually not.
In some PHP environments, a value of:
0
can remove the normal execution-time limit.
That is not a good default troubleshooting solution for a production WordPress website.
A broken script could continue consuming resources for far longer than intended.
Use a reasonable limit and correct the process that is taking too long.
Why Doesn’t Changing max_execution_time Fix the Problem?
Another layer may be terminating the request first.
Possible limits include:
- PHP-FPM request timeouts,
- Nginx proxy timeouts,
- Apache limits,
- Cloudflare or CDN timeouts,
- hosting process limits,
- database timeouts,
- and plugin-specific time limits.
If you increase PHP execution time but the browser still fails at exactly the same point, check the server and proxy logs.
Can Slow External APIs Cause This Error?
Yes.
A PHP script may spend most of its execution time waiting for an external service.
Examples include:
- payment gateways,
- shipping APIs,
- SEO services,
- email services,
- backup storage,
- license servers,
- and marketplace integrations.
If the timeout involves an HTTP request rather than local processing, investigate the external service and WordPress HTTP errors as well.
What Should You Ask Your Hosting Provider?
If you cannot change the limit or the error persists, give your host precise information.
Tell them:
- the exact error message,
- the URL or admin action that triggers it,
- the time the error occurred,
- the current
max_execution_time, - and whether it happens with plugins disabled.
Ask them to check:
- PHP execution limits,
- PHP-FPM limits,
- PHP worker usage,
- CPU and memory restrictions,
- database performance,
- and server timeout logs.
Final Checklist
If WordPress reports a maximum execution time error, work through these steps:
- Identify the exact action that takes too long.
- Temporarily disable the plugin involved.
- Check the current PHP
max_execution_time. - Increase the limit through your hosting PHP settings if appropriate.
- Use
php.inior.user.inionly when supported. - Break large WordPress jobs into smaller batches.
- Check PHP memory, CPU, database, and worker usage.
- Review PHP, WordPress, and server logs.
Increasing the PHP timeout can solve a legitimate long-running task, but it should not hide inefficient code or an overloaded server. Find out why the process is slow first, then choose an execution limit appropriate for the task.