Are you getting a Fatal Error: Maximum execution time exceeded error message while using WordPress? This error means that PHP script that you were running took longer to complete than the limit allows, therefore it was stopped. This tutorial will help you solve this error on your website.
What you’ll need
Before you begin this guide you’ll need the following:
Table of Contents
Option 1 – Installing WP Maximum Execution Time Exceeded plugin
WordPress has a huge community so there is likely a plugin or even several for each functionality that you would need. Same is for increasing maximum execution time – you can install WP Maximum Execution Time Exceeded plugin to fix this error. You can find detailed instructions on how to install plugins in WordPress here.
This plugin modifies your .htaccess file to increase maximum execution time limit. Once you install this plugin there is nothing else you need to do, everything is done by the plugin. There is no settings page for the plugin so if you want to undo any changes just remove the plugin and changes to .htaccess will be undone.
Option 2 – Editing .htaccess file manually
If you already have plenty of plugins installed and do not want to use additional one or it simply did not fix your issue then you can edit .htaccess file manually to increase maximum execution time limit. The easiest way is to use File Manager located in your hosting control panel. If you are not sure how to locate the
.htaccess file there is a detailed guide here. You will need to enter the following code at the bottom of .htaccess file and Save it:
php_value max_execution_time 60
This would increase maximum execution time to 60 seconds (1 minute). If you are still getting the same error you can try increasing this value even more – to 120/180 seconds etc.
Option 3 – Changing max_execution_time value via cPanel
If you are using cPanel then you can increase max_execution_time directly via cPanel. Go to Select PHP Version section.
Now click on Switch To PHP Options link.
Increase the default value that you see in max_execution_time row. Usually, it is set to 30 seconds by default so in our example we are increasing it to 60 seconds. Click Apply to save your changes.
That’s it, you have successfully increased max_execution_time limit for your website.
Following this tutorial, you have learned 3 ways to increase max_execution_time for WordPress and fix Fatal Error: Maximum execution time exceeded. If you are using shared hosting services and none of the solutions worked for you then you should contact your hosting provider to check what your actual limit is and if it is possible to increase this limit at all.