If you are WordPress user, then you may have faced an error something like “Fatal Error: Maximum execution time exceeded.”
This type of error may cause whenever you are trying to use a plugin or while you are updating your theme or plugin files and they are taking more time than allowed in the “php.ini” file.
Even though this error is not so common in most WordPress installations, it could be quite a task for beginners to solve.
So in this quick fix session, let us see the different methods to fix the problem PHP maximum execution time exceeded error.
1. Editing php.in File
Note: This method works even when you are using local WordPress installations using XAMP or WAMP.
If you can access “php.ini” file in your web hosting account or if your hosting provider supports custom “php.ini” file, then you can easily increase the execution time.
Just open up the “php.ini” file and search for the rule
max_execution_time and change the value of it to
Basically, what we did is that we increased the execution time to 300 seconds (5 minutes). Once you have edited the rule, it looks something like this.
max_execution_time = 300
After editing the file, just save the file and close it. You are done increasing the execution time and if you still face the problem then try increasing the execution time even more.
2. Editing .htaccess File
The other way around to increase the execution time of PHP is by adding a simple rule in your .htaccess file.
To do that, fire up your favorite FTP client and open up the .htaccess file located in your root directory. Here, just copy and paste the below rule into your .htaccess file, save and upload it.
php_value max_execution_time 300
That’s all there is to do, you have successfully increased the PHP execution time. If you still face the problem then try increasing the execution time even more.
3. Using a WordPress Plugin
If you are uncomfortable editing “php.ini” or “.htaccess” files, then you can use a simple plugin called WP Maximum Execution Time Exceeded, which helps you change the execution time.
You can install that plugin like any other WordPress plugin. Once installed, the plugin will automatically increase the PHP execution time to 300 seconds or 5 minutes.
This method ensures that you don’t have to mess with any file manually.
That’s all there is to do and it is that simple to fix a common error like “Maximum time execution exceeded.”
Hopefully that helps and do comment below if you have any problems implementing these above-mentioned steps.