How To Fix “Maximum Execution Time Exceeded” In WordPress
Last modified: April 22, 2020
If you’re experiencing the ‘Fatal error: Maximum Execution Time of 30 Seconds Exceeded’ on your screen when trying to update a plugin or theme, then you need to find a fix. This error occurs when a PHP code is taking too long to run and reaches a pre-set time limit.
This is a common problem, but an easy one to fix, especially if step one occurs.
Step One: The Recovery Email
While this is frustrating, it is one of the easiest errors you can fix on your WordPress website. And recent updates of WordPress have even allowed for you to be told which plugin has caused the error. If you get one of these emails there is a special link that will allow you to log into your WordPress site within ‘Recovery mode’ and then deactivate or delete the plugin that is causing the error.
Step Two: Manually Edit .htaccess File
Sometimes you might not want to deactivate the plugin. So you will need to fix the error manually by editing your .htaccess file. You can access this by using an FTP client, like FileZilla, then open up your htaccess file with the ‘view/edit’ option.
Then add in this code at the bottom of the .htaccess file:
php_value max_execution_time 300
Once entered, save the file.
See if your site now works.
Step Three: Edit The php.ini
Another method is to fix the execution time exceeded in the php.ini. This is often a hidden document or not even included within the root folder, so you will need to create it.
You can create it using your FTP client inside the root folder for your website. After you’ve created the document, add the following line:
max_execution_time = 60
Remember to ensure that any changes are saved and uploaded.
Step Four: Contact Your Web Host
In most cases you should have resolved the issue and you shouldn’t see the error again. However, sometimes the problem is not an easy fix and you will need to contact your website hosting solution to resolve the issue. They might be able to fix an error that is on the server.
Remember to tell them that you’ve completed the top three steps and any details (like the plugin name that is causing the issue).
In most cases, your web host will be very helpful.
Final Word: Don’t Let A Simple Error Derail You
This is a simple error that you can fix. You don’t need the help of a web development company to fix it. All you need is some time and the clear, simple steps above. If you are stuck, you might also find help on the community forums. They can be very useful too.
A Savvy WordPress developer, years of experience developing for web (PHP, JS, jQuery, Vue, MySQL, etc.), SEO specialist, and more…