WordPress hosting services typically use PHP or Hypertext Preprocessor. It is a scripting language that is commonly used for open source and website applications.
There is a specific time that dictates how long it takes for a script to execute or run. In this case, the time limit affects WordPress. The time limit varies from one hosting service to the other. But generally, they range from 30 seconds to a minute.
When and why this fatal error occurs?
In WordPress, this fatal error message occurs when a plugin or the theme is undergoing an update. During the process, when the set limit is crossed, the webpage displays this error message.
The reason why this time limit is set is to keep the web servers safe and increase their safety.
How to fix it?
Although the error message says ‘fatal,’ it is a widespread issue experienced by WordPress users. And it can be fixed easily.
There are two common ways to fix this – Manual editing and using a plugin.
1. How to fix fatal error – maximum execution time exceeded, manually.
· Log in to the webserver you are using. You can do this with the help of a free FTP client such as FileZilla.
· Go through the folders and locate the .htaccess file. It will be among the /wp-admin/ and /wp-content/ folders. In FileZilla, it is located in the right column under the ‘Remote Site.’
· Right-click on the .htaccess folder and open it using a text editor of your choice. You will have the option to download the file or view it to edit it.
· Next, you need to add a PHP value to the text in the file. Go to the bottom of the text and add ‘php_value max_execution_time 300.’ It increases the execution time from a minute to five minutes. This is the general and effective fix that works for most systems.
· Save the file. If you downloaded the file before editing, you would need to upload it to the webserver first. If you did not download it and edited the file live, simply refresh the webserver page.
· Resume the theme or the plugin update you were working on to see if the problem has been solved. If however, you experience error messages, try increasing the number of the PHP value from 300 to 400 and above.
Another way to manually fix this error is by making changes to the php.ini file. It is a configuration file that determines the PHP settings on the webserver.
· Locate the root folder in WordPress. Create a php.ini file in it.
· Add ‘max_execution_time = 60’ to the php.ini file.
· Save the changes.
· Upload the file to the webserver.
2. How to fix the error by using a plugin.
Some people find the idea of manually editing a file complicated. If you are one of those, you can install a plugin.
· Locate the plugins available on your computer.
· Towards the bottom, find the ‘add new’ option.
· Click on search.
· After the search is completed, locate the wp maximum execution time exceeded plugin.
· Install the file to your computer.
· Activating it will raise the execution time automatically from 30 or 60 seconds to 300 seconds.
What to do when the .htaccess file is not available?
This happens when the file is either hidden or is not generated by WordPress. Both of these problems are very commonly encountered.
1. If you cannot see the file, check-in the hidden files folder. You are required to change the settings of the FTP client in this case. In FileZilla, locate the ‘server’ option and check the ‘force showing hidden files.’
2. If you are using other FTP clients, show hidden files option can be accessed in the preference menu or the app settings. Check the box, and .htaccess will show on the WordPress site.
3. If you are using cPanel to access the File Manager, ‘show hidden files (dotfiles) can be obtained before the app is activated. Check the option to view the .htaccess file.
What to do when .htaccess is not generated by WordPress?
In WordPress, it is not uncommon for .htaccess files to be missing altogether. It happens when the file has not been generated by WordPress. In this case, go to Settings and click on Permalinks.
Without editing anything, just click on Save. This will automatically trigger WordPress to generate the .htaccess file in your site.
Following the above steps will solve the fatal error – maximum execution time exceeded issue. If none of the above methods works for you, contact your hosting provider for WordPress.
By the way, we have written more posts regarding solving wordpress errors such as How to fix internal server error in WordPress. Do check it out if you want more info on the topic.
Also, if you like this article, please share it with your friends on social media because you might help someone looking for this information!