How to Solve WordPress Fatal Error: max_execution_time Exceeded Error

Fatal Error: max_execution_time exceeded, If you are getting this screen message on WordPress it is because the PHP script you are trying to run is perhaps taking longer to complete than the limit on your server allows.

This is actually among the most common WordPress errors, and could also be in warning messages like: “Maximum execution time of 30 seconds exceeded” or “Maximum execution time of 60 seconds exceeded”. This means that it is taking to longer for a process to complete and it is timing out.

Usually, web servers set a time limit on how long a script should or can run. The time limit is set in order to prevent your webserver from abuse. WordPress is a CMS made up of PHP scripts and thus each script must run completely within the set time limits. 30 seconds is the standard time, this is more than enough time for any script to run sufficiently.

Read: Most Common Ways WordPress Websites Break

How then do we fix the Fatal Error: max_execution_time exceeded?

Firstly we will go through the first isolation methods recommended to trace the problem, this includes,

Fix Method 1: Disabling Your Plugins one by one

We will start with your plugins, should the problem get solved after disabling your plugins, then most probably, the problem causing script is in one of your plugins, it is thus the time-consuming script and you should delete it. Read our past article on how to manage plugins: How to install, manage and uninstall or delete a WordPress Plugin

If this plugin is really important and can’t is disabled or deleted, then you will have to attempt to get another plugin that offers similar functionality this is the beauty of WordPress.

If the plugin isolation does not work, the next step is to check your theme.

Fix Method 2: Disabling Your Currently Active Theme

You can put your website on maintenance mode then disable your theme. Should this eliminate the Fatal Error: max_execution_time exceeded, then this means that the faulty script is in your theme. The next step is to delete the theme and reinstall a fresh copy or try another new theme entirely. Here is our past article on managing themes: How to add or install a new WordPress Theme

If doing the two above does not fix the error then below are four ways, among these the easiest way for non-techies, that does not involve editing any code is to use plugins.

Fix Method 3: Just Contact Your Host

iThe process of Increasing the PHP Time Limit might prove to be a complex issue, further, methods may differ from web host to web host. Therefore it is always safer to let this be done by the host themselves. It is thus best to just get in touch with your web hosting company and they will be happy to work it out for you from their end.

Fix method 4: Install a Plugin to Increase the Execution Time Limit

When fixing this error for one of our clients, we used the Google Pagespeed Insights it is quite simple and straightforward. Another plus is that the developer updates it regularly, thus might fix any new bugs to avoid compounding your problem. So therefore

  1. Search for Google Pagespeed Insights plugin in the WordPress plugin database from your WordPress dashboard.
  2. Install and activate the Google Pagespeed Insights plugin.
  3. Go to Tools -> Pagespeed Insights. Scroll down, find Advanced Configuration, and then from here change the maximum execution time as required. It is however recommended to use the default settings, they actually will work just fine on most servers hosting websites.

If the Google Pagespeed Insights does not work you could also try the WP Maximum Execution Time Exceeded plugin. This plugin does the work for you. it does automatically increase the execution time limit by adding a configuration to your .htacess file. Just install it on your dashboard and your website’s time limit will be increased. If, in the future, you want to reset the time limit to default values, simply uninstall the plugin.

Now to the bit where things get a bit geeky:

Fix method 5: Edit file  wp-config.php:

Add the following to wp-config.php:


Fix method 6: Edit file .htaccess:

Make sure you back up .htaccess before you edit it. 

Add the following to .htaccess:

php_value max_execution_time 60

Fix method 7: Editing php.ini

This is another alternative to the wp-config.php method. Simply add/edit the following line in the php.ini of your WordPress. You have to note however that, most small shared hosting providers do not allow users to access the PHP.ini file. If however, you are able to get access, you can directly increase the PHP Time limit by adding a line through this file

Add the following to php.ini:

max_execution_time = 60

NOTE: 60 in the above code samples means 60 seconds. You can change this to any appropriate number that suits your server. If you’re still getting the same error, you can try increasing the value to 120-180 seconds

These are therefore the quick fixes for the Fatal Error: max_execution_time exceeded!.

Wonderful!, just before you go, If you like these WordPress fixes, there is more: Please subscribe to our website for the latest tips, ideas, and recommendations to make your WordPress Websites wonderful.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 151 other subscribers

%d bloggers like this: