Have you ever gotten into trouble that you cannot update or publish an event smoothly on your WordPress website? If so, you may have suffered “Fatal Error: Maximum execution time exceeded”. Since many readers are unfamiliar with this big issue and has lost their bearings, we would like to make a brief introduction on this error and then list several valid methods to work it out.
What Is Maximum Execution Time Exceeded Error?
The Fatal Error of Maximum Execution Time Exceeded is occasionally occurred when you update a theme, install a plugin, download an application or go head some other operations on your website. The primary cause of this issue is that the execution time exceeds the default values.
By default, the maximum execution time of PHP system is 30 seconds. If the PHP script takes excessive time to run effectively, then it results in maximum execution time error. Thus, to get rid of this embarrassing situation, you are required to expand the execution time limit.
Fix Maximum Execution Time Exceeded Error Manually
The preferred method to fix this fatal error is to modify the maximum execution time value manually. There are three files available for you to this end, including .htaccess file, wp-config.php file and php.ini file. And now, let’s get started to make a hit with the given coding stuff.
Open the php.ini file by using a FTP client. Here, we are going to complete the following steps via cPanel, which is the most powerful control panel for website management. Log into cPanel with your account and then go to Files > File Manager. Pitch on a website URL that the document root for and “Go” to the next page.
Seek out .htaccess file from a list of files and right click it to enter the edit page. Since all code has been brought out, you should add the following code to .htaccess file. You are allowed to modify the values as you want. The example as below means you have increased the maximum execution time to 120s. Finally, save and close the file.
php_value max_execution_time 120
wp-config.php file is one of the most important files in WordPress that enables various configurations to make your website more functional. In the face of the maximum execution time exceeded error, this file can also act as a valid solution for you. As the way to search for .htaccess file, you need to go to Files > File Manager and open the wp-config.php file in an editor. And then, add the following code to the editor and click “Save” to confirm the change.
Note that, the number “60” means you have set the maximum execution time as 60 seconds, which can be modified if needed.
Open you php.ini file or create a new one via cPanel > Files > File Manager > New File. And then, add the following code to this file and modify the values according to your own needs. Save this file to make the command into effect.
max_execution_time = 120;
Fix Maximum Execution Time Exceeded Error with Plugin
WordPress has released a large number of plugins as solutions for various purposes and that include fixing maximum execution time exceeded error. Here, the WP Maximum Execution Time Exceeded plugin is selected in the following guide. This guide is designed for people who are weak in coding stuff and prefer to achieve the goal with WordPress plugin.
Search and install WP maximum Execution Time Exceeded via WordPress Dashboard > Plugins > Add New. And then, activate this plugin and make it work for your website properly. Since you have installed and activated this plugin, the maximum execution time has automatically soared to 300 seconds in real time.
Honestly, the use of WordPress plugin is a more trouble-saving method. However, if you prefer to modify the time limit by yourself, then the first method is much more suitable for you. Here, we would like to recommend these 3 WordPress hosting companies as below, which are regarded as the top 3 web hosts in the market and promise to provide you with unlimited hosting resources.