The PHP max_execution_time setting controls how many seconds a PHP script can run. If a script reaches that limit during a large import, backup, or plugin update, WordPress may display the Maximum execution time exceeded error.
To fix it, check the error message or PHP error log for clues about which plugin, theme, or script timed out. If the task needs more time, raise the PHP limit in your hosting dashboard or a configuration file. Then verify the new limit and retry the task. If the error persists or you can’t change the setting, contact your hosting provider.
What is causing the max_execution_time exceeded error
Start with the action that triggered the error. If a large import or backup timed out once, the task may simply need more time. If the error keeps returning during routine tasks, check what PHP was running when it stopped.
- Find the error entry. Look for Maximum execution time in the error message or in your PHP error log around the time the task failed. On Hostinger, you can find your site’s PHP error log in the .logs folder.
- Check the file path. A path such as
wp-content/plugins/plugin-name/orwp-content/themes/theme-name/shows which plugin or theme file PHP was running when it stopped. Use that path as a clue and check whether the timeout started after a recent update or change. - Test the suspected plugin or theme. On a staging copy if you have one, temporarily deactivate the plugin or switch to a default WordPress theme, then retry the action. If the error goes away, update or replace the affected plugin or theme before re-enabling it.
How to increase max_execution_time in WordPress
You can increase max_execution_time in your hosting dashboard or by editing a configuration file your server supports. Note your current limit first and use one method at a time so you can verify which change took effect.
Increase the PHP time limit in wp-config.php
Use this method if your host lets WordPress change PHP settings at runtime. Open wp-config.php in your WordPress root folder and download a backup copy.
Add this line just above the comment that begins That’s all, stop editing!. If the file already sets max_execution_time, update the existing line.
ini_set( 'max_execution_time', '60' );
Replace 60 with your chosen limit in seconds and save the file. This change applies to requests that load wp-config.php. If the active limit stays the same, use your hosting dashboard or ask your provider whether it permits runtime changes.
Increase the PHP time limit in .htaccess
Use this method if your hosting provider supports php_value directives in .htaccess. Open your WordPress root folder in your hosting file manager and download a backup copy of .htaccess before editing it.
If the file already contains a php_value max_execution_time line, update its value. Otherwise, add this line at the end of the file:
php_value max_execution_time 60
The value is in seconds. Use 60 if your current limit is lower and your hosting plan supports it. Save the file, then reload your site. If you see a 500 Internal Server Error after saving, restore your backup and try another method.
Increase the PHP time limit in php.ini or .user.ini
If you manage PHP on your server, open the php.ini file used by your website. If your hosting provider supports .user.ini, open or create that file in your WordPress root folder.
Back up the file if it already exists. Update the max_execution_time line or add it if it’s missing:
max_execution_time = 60
Replace 60 with your chosen limit in seconds, then save the file. After editing php.ini, you may need to reload PHP-FPM or restart the web server for the change to take effect. Changes to .user.ini can take a few minutes to apply.
Increase the PHP time limit in Hostinger dashboard
You can also increase the WordPress max_execution_time directly from PHP Configurations in Hostinger dashboard.
- Go to Websites in the Hostinger dashboard and select Manage site for the affected website.
- Search the sidebar for PHP Configuration, then open the PHP Options tab.
- Find
max_execution_timeand enter a higher value in seconds. For example, if the current limit is 30 seconds, try 60 seconds if your plan supports it. - Click Save.
Your hosting plan sets the maximum value you can use.

Contact your hosting provider
If you can’t change max_execution_time or the task still times out after you raise it, contact your hosting provider. Share the exact error message, the action that triggered it, and when it happened, including your time zone.
Ask your provider to confirm the PHP time limit in effect for your site, the maximum your plan supports, and whether another server timeout could be stopping the task.
How do you check whether the new PHP time limit worked?
In your WordPress dashboard, go to Tools → Site Health → Info → Server and check PHP time limit. If you changed the limit in the Hostinger dashboard, you can also search for PHP Info in your site’s dashboard and check max_execution_time there. For changes made in wp-config.php, use WordPress Site Health.
Once you see the new value, retry the same action that timed out. If the error returns, check how many seconds the new error message reports. A different value can help you or your hosting provider determine whether the failing request is using a different PHP limit.
If the new error says Allowed memory size … exhausted, the task hit PHP’s memory limit. Check whether you need to raise the memory limit for your WordPress site.
This article is a localized version of How to fix the max_execution_time exceeded error in WordPress, originally published in English.