How to Fix Fatal Error: Maximum Execution Time Exceeded in WordPress
March 8, 2022 | All | No Comments
When trying to update a WordPress plugin or theme, do you see ‘Fatal error: Maximum execution time of 30 seconds exceeded’ on your screen?
There is a problem when PHP code in WordPress takes a long time to run and reaches the server’s maximum time limit. This time limit is important, as it prevents abuse of the server.
We will show you how to fix the fatal error: maximum execution time exceeded in WordPress in this article. How to Fix WordPress Fatal Error: Maximum Execution Time Exceeded.
What is the Maximum Execution Time Exceed error?
PHP is the primary language used by WordPress. The PHP script execution time limit is set to prevent abuse of web servers.
In general, the maximum execution time varies between hosting companies, however, 30 – 60 seconds is usually adequate for a good PHP script.
Scripts that reach their maximum execution time limit result in a maximum execution time exceeding error.
WordPress Error 30 Seconds Maximum Execution Time Exceeded
Fixing the Maximum Execution Time Exceeded error
While the Maximum Execution Time Exceeded error is called a ‘fatal error,’ it is one of the most common WordPress errors, and you can easily resolve it.
WordPress may display the following error message depending on when and where the error occurs.
Difficulties with technology
In WordPress 5.2, a fatal error protection feature was added. Additionally, you may also receive an email telling you which plugin (if a plugin triggered the error) caused the problem.
Email sent to admin regarding a technical issue
A link will also be included in the email that will allow you to log in with ‘Recovery mode’.
In recovery mode
If you find the plugin that is causing the error, simply deactivate or delete it.
It is also possible to fix the underlying cause of the error if you don’t want to deactivate a plugin.
The error can be fixed by manually editing your .htaccess file and adding a line of code.
FTP clients can be used to connect to your website.
The .htaccess file is located in the same folder as your /wp-content/ and /wp-admin/ folders.
The ‘Remote Site’ section is on the right-hand side of the right-hand column if you use FileZilla as your FTP client.
The .htaccess file in Filezilla for WordPress
Once you have located the .htaccess file, right-click and select ‘View/Edit’. A text editor will open the file.
View/Edit the .htaccess file in WordPress
Add the following line at the bottom of your .htaccess file:
1 The PHP value max_execution_time is 300
Here’s how it may look in your text editor if you’re using Notepad.
Adding code to the .htaccess file
Save your file once you are finished.
The code simply sets the maximum execution time to 300 seconds (5 minutes).
Try increasing the value to 600 if you still get an error.
These WordPress .htaccess tricks will be more useful if you liked this method.
In addition to modifying your php.ini file, you can fix the maximum execution time exceeded error in WordPress.
It is a configuration file that defines PHP settings on your server.
You may not see it in your WordPress folder on many WordPress hosting platforms.
If that is the case, you can create a new php.ini file inside your WordPress root directory.
The following line should be added to the php.ini file.
1 max_execution_time = 60
Keep your changes saved and uploaded.
Now that the error has been resolved, you can check your website to see if it is still there.
The maximum execution time can usually be increased using either of these two methods to resolve the error.
You should, however, contact your WordPress hosting provider if it doesn’t work.
You may have found this article helpful in fixing the fatal error: maximum execution time exceeded in WordPress.
Please subscribe to our YouTube Channel for more WordPress video tutorials if you liked this article. On Twitter and Facebook, you can also follow us.