October 4, 2019
October 4, 2019
Are you getting a Fatal Error: max_execution_time exceeded message while using WordPress? No worries. It simply means that the PHP script you run takes longer to complete than the limit allows. Read on to find out how to solve this issue.
There are three methods that you can use to fix the max execution time error in WordPress: editing the .htaccess file, changing the time limit via the control panel, and installing a plugin.
By default, the max_execution_time is usually set to 30 seconds. If your PHP scripts need more time, then you need to edit the value in the .htaccess file.
Here’s how to do it:
php_value max_execution_time 60
If you’re still getting the same error, you can try increasing the value to 120-180 seconds
You can also increase the WordPress max_execution_time directly from PHP Configurations in hPanel.
That’s it — you have successfully increased the WordPress max_execution_time limit of your PHP script!
An easy way to fix the WordPress max_execution_time error is by using a plugin. We recommend using Google Pagespeed Insights as it is straightforward and the developer updates it regularly.
Should you want to undo any changes, simply deactivate the plugin and all the changes made to .htaccess will be removed.
You’ve learned three easy ways to fix the WordPress max_execution_time error. Here’s a quick recap of those methods:
There you have it, easy and quick fixes! If you’re using shared hosting services and none of the solutions worked for you, contact your hosting provider and ask if it’s possible to increase the maximum execution time. Good luck!