Fix Fatal Error: Maximum Execution Time Exceeded In WordPress
April 4th, 2017 | by Ravi Chahar || 2 Comments |
While running a WordPress website, you may encounter with some critical situations which can be overwhelming.
One of our readers has seen a maximum execution time of 30/60 seconds exceeded error. It can freak you out because you wouldn’t able to install any new plugin or theme.
But you can “fix fatal error: maximum execution time exceeded” by increasing the execution time limit. Most of the WordPress users aren’t techie that’s why WordPress seems hard to deal with.
In this tutorial, you will learn the reason of getting such error and the different method to fix it.
The Reason To Get Such Fatal Error
WordPress is an amazing platform which consists mainly PHP codes. It’s plugins and themes are also coded in PHP.
You may see execution time exceeded error while updating or install a plugin. The same can happen while handing a WordPress theme.
And why do you get this error? Well, every web hosting has a script which has a fixed execution time limit for the PHP scripts.
It’s important to save their server. If you’re using a shared web hosting and you install a poorly coded plugin which takes so much time to get executed then it may conflict other users.
So they set an execution time and if the PHP scripts cross this limit then you receive such error.
Fixing this Error Using the .htaccess File
You just have to increase the execution time limit and it will get fixed. For different web hostings, the time limit will vary.
Some web hostings have 30 seconds limit whereas others have 60 seconds. Depending on this limit, you will receive the error message.
You have to edit the .htaccess file using your web hosting account.
Go to cPanel>>file manager>>root directory and search for the .htaccess file. If you’re using Yoast SEO plugin then you can edit it from your WordPress admin panel only.
There is another way using the FTP account.
Open it and add the code.
This means you have increased the execution time to 300 seconds. If you still get the same error then its value can be increased.
Though 300 seconds are more than enough.
Use A Plugin To Fix Fatal Error: Maximum Execution Time Exceeded In WordPress
If you’re afraid of dealing with the .htaccess file and the cPanel then you can use a plugin.
Install and activate WP Maximum Execution Time Exceeded plugin and you’re done. Yes, you don’t need to do any setting for this plugin.
That’s the best thing. There is a default execution time limit in this plugin.
There is one demerit of this plugin. If you would want to increase the limit more than 300 seconds then you can’t. To do that you have to use the manual method shown above.
But that’s a rare case which doesn’t get included. The choice is yours whether you want to use the .htaccess file method or the plugin.
I would recommend the first one. I hope you can easily fix fatal error: maximum execution time exceeded in WordPress.
You would also want to read a tutorial to fix “Memory Exhausted Error“. If you still have any problem, feel free to drop a comment.
You can also connect with us on Twitter, LinkedIn, and Facebook.
Hi Ravi,
That’s a quick fix buddy and I’m sure may newbies will like it.
We get this error often with poorly coded script (theme or plugin) or when the server is sick. Optimizing the code will always be the best solution. Sometimes, you may need a server upgrade ?
Thanks for the simple solution to your readers buddy
Hey Enstine,
Most of the time when you use a plugin or theme with no so optimized code is the reason. Yes, you’re right. It can be the server bandwidth problem. But it gets exhausted by the plugins only.
The quickest fix is increasing the execution time limit.
Thanks for sharing your thoughts.
~Ravi