Have you been getting an error in WordPress that says “Fatal Error Maximum Execution Time Exceeded” whenever you try to perform a task like updating a theme or a plugin in WordPress?
Worry not. You’re not alone. Many WordPress users have encountered this error while performing various tasks and updating WordPress or plugins.
This is a common error that can be easily fixed. In this post, we’ll show you two simple methods for fixing it and guide you through the process with step by step instructions.
First, let’s figure out what’s causing this error in the first place.
What Is ‘Fatal Error Maximum Execution Time Exceeded’ Error?
In order to understand what this error is all about, you need to understand how WordPress works. As you may know, WordPress is developed with PHP and WordPress uses certain PHP scripts to perform specific functions within the system. For example, when updating WordPress to a newer version, it runs scripts to perform functions like updating databases.
Sometimes, when WordPress is executing these scripts it could take an unusually long time. Like when you try to update WordPress during a peak time when your website is filled with traffic. This often leads to higher server resource usage.
So, to prevent websites from abusing server resources, web hosting providers put a time limit to how long a script is allowed to run. When that time limit is exceeded during a script execution, you’ll receive the “Fatal Error Maximum Execution Time Exceeded” error.
How To Fix The Error
You can fix the error in two simple ways. First involves using a plugin and the other method involves editing a core WordPress file in the server.
We recommend that you use the second method. Mostly because plugins aren’t the most reliable option since they often run into conflicts and issues.
But, if you’re a complete beginner and not sure about editing WordPress files, go with the plugin option.
Note: Always remember to backup your website before making any changes to system files. If you don’t have have a backup system, use our guide to setup automatic backups for free.
Method 1: Use The WP Maximum Execution Time Exceeded Plugin
The easiest way to fix the issue is using the WP Maximum Execution Time Exceeded free plugin. With this plugin, you can instantly fix the error with just a few clicks without having to manually edit any WordPress files.
Login to your WordPress dashboard and go to Plugins >> Add New
Search for the WP Maximum Execution Time Exceeded plugin and then click Install.
Once you Activate the plugin, it will automatically extend your maximum execution time to 5 minutes, giving your website plenty of time to run different types of scripts.
Method 2: Edit The .htaccess File
This method involves editing the .htaccess file, which is located in your server.
You can use an FTP client app to access your server. For the demonstrations, we’ll show you how to locate the .htaccess file using the CPanel to make the process easier for beginners.
Step 1: Login To CPanel
You can access CPanel through your website hosting account. Or, you can directly access CPanel by typing it at the end of your domain name (eg: yourwebsite.com/cpanel)
Login to CPanel using the username and password given to you by your web host. Check the welcome email sent to you by the web hosting provider to find the login details.
Step 2: Locate .htaccess File
Once you’re inside the CPanel, find the File Manager and then open the public.html folder to locate all the files related to your website.
Here you’ll find the .htaccess file.
Step 3: Edit .htaccess File
First, make a backup copy of the .htaccess file, just in case. Then right-click on the .htaccess file and choose Edit.
Once the file is open, paste the following code at the bottom of the page.
php_value max_execution_time 300
Click Save Changes.
This will set your server maximum execution time to 5 minutes.
Additional Steps: Disable Plugins & Themes
If you’re still getting the error after following the previous methods, then a faulty plugin or a theme might be causing the error.
Login to your WordPress admin dashboard and disable all of your plugins. Then try enabling the plugins one by one until you can figure out which plugin is causing the issue.
If that doesn’t work, try switching your current theme to the default WordPress theme to see if the error is caused by a plugin-theme conflict.
In most cases, the main reason the “Fatal Error Maximum Execution Time Exceeded” error is your web host putting strict execution time limits for your server. This is usually common on shared hosting plans, which are hosted alongside thousands of other websites on the same server. Web hosts use tricks like limiting execution times to reduce server load.
This type of issues will be less common when using managed WordPress hosting or VPS hosting plans. If the error continues to persist, consider moving your website to a better hosting provider.
Leave a Reply