How to Fix Fatal Error: max_execution_time Exceeded Error in WordPress

1. Increase the max_execution_time in your php.ini file

If you have access to your php.ini file, you can increase the max_execution_time setting to a higher value. This will allow your scripts to run for longer before timing out.

2. Increase the max_execution_time in your .htaccess file

If you don’t have access to your php.ini file, you can also increase the max_execution_time setting in your .htaccess file. This will allow your scripts to run for longer before timing out.

3. Increase the max_execution_time in your wp-config.php file

If you don’t have access to your php.ini or .htaccess file, you can also increase the max_execution_time setting in your wp-config.php file. This will allow your scripts to run for longer before timing out.

4. Contact your web host

If you don’t have access to any of the above files, you can contact your web host and ask them to increase the max_execution_time setting for your account.
[ad_1]

Are you getting a Fatal Error: max_execution_time exceeded message while using WordPress?  No worries. It simply means that the PHP script you run takes longer to complete than the limit allows. Read on to find out how to debug this WordPress issue.

Solving Max Execution Time WordPress Error

There are three methods that you can use to fix the max execution time error in WordPress: editing the .htaccess file, changing the time limit via the control panel, and installing a plugin.

Manually Editing .htaccess File

By default, the max_execution_time is usually set to 30 seconds. If your PHP scripts need more time, then you need to edit the value in the .htaccess file.

Here’s how to do it:

  1. Open the File Manager in Hostinger’s hPanel and navigate to the public_html directory.
  2. Double-click the .htaccess file.
  3. Insert the following code into the bottom of your .htaccess file:
    php_value max_execution_time 60
  4. Press Save and Close.

Pro Tip

If you’re still getting the same error, you can try increasing the value to 120-180 seconds

Changing max_execution_time value via hPanel

You can also increase the WordPress max_execution_time directly from PHP Configurations in hPanel.

  1. Login to Hostinger’s hPanel and navigate to PHP Configurations under the Advanced section.
  2. Select the PHP Options tab and scroll down until you find the max_execution_time option.
  3. Increase the default value as needed and click Save.

That’s it — you have successfully increased the WordPress max_execution_time limit of your PHP script!

Installing a Plugin to Increase Execution Time Limit

An easy way to fix the WordPress max_execution_time error is by using a plugin. We recommend using Google Pagespeed Insights as it is straightforward and the developer updates it regularly.

  1. Install the plugin for Google Pagespeed Insights from your WordPress dashboard and activate it.
  2. Navigate to Tools -> Pagespeed Insights. Scroll down, find Advanced Configuration, and change the maximum execution time as needed. However, we recommend using the default settings as they will work fine on most websites.this image shows you the advanced settings of Google PageSpeed Plugin
  3. Click Save Options and the plugin will automatically modify the .htaccess file.

Should you want to undo any changes, simply deactivate the plugin and all the changes made to .htaccess will be removed.

Conclusion

You’ve learned three easy ways to fix the WordPress max_execution_time error. Here’s a quick recap of those methods:

  1. Insert the php_value max_execution_time 60 code into the .htaccess file.
  2. Extend the limit directly through PHP Configurations in hPanel.
  3. Increase the time limit by using Google Pagespeed Insights plugin.

There you have it, easy and quick fixes! If you’re using shared hosting services and none of the solutions worked for you, contact your hosting provider and ask if it’s possible to increase the maximum execution time. Good luck!

[ad_2]

How to Fix Fatal Error: max_execution_time Exceeded Error in WordPress

If you’re a WordPress user, you may have encountered the dreaded “Fatal Error: max_execution_time exceeded” error. This error occurs when the maximum execution time for a script is exceeded, and it can be a real headache to fix. Fortunately, there are a few simple steps you can take to resolve this issue.

What Causes the max_execution_time Exceeded Error?

The max_execution_time error occurs when a script takes longer than the maximum execution time set by the server. This can be caused by a variety of factors, including:

  • A slow server
  • A poorly coded plugin or theme
  • A large number of database queries
  • A large number of images or other media files

How to Fix the max_execution_time Exceeded Error

Fortunately, there are a few simple steps you can take to fix the max_execution_time exceeded error. Here’s what you need to do:

1. Increase the max_execution_time Limit

The first step is to increase the max_execution_time limit in your server’s php.ini file. To do this, open the file in a text editor and look for the line that reads “max_execution_time = 30”. Change the number to a higher value, such as “max_execution_time = 60”. Save the file and then restart your web server.

2. Disable Unnecessary Plugins and Themes

The next step is to disable any unnecessary plugins and themes. This will help reduce the amount of time it takes for the server to process the script. To do this, go to the “Plugins” or “Themes” page in your WordPress dashboard and deactivate any plugins or themes that you don’t need.

3. Optimize Your Database

The last step is to optimize your database. This will help reduce the amount of time it takes for the server to process the script. To do this, you can use a plugin such as WP-Optimize or WP-DBManager. These plugins will help you optimize your database and reduce the amount of time it takes for the server to process the script.

Conclusion

The max_execution_time exceeded error can be a real headache to fix, but it’s not impossible. By following the steps outlined above, you should be able to resolve the issue and get your WordPress site back up and running in no time.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

GSTIN is 03EGRPS4248R1ZD.

Contact
Jassweb, Rai Chak, Punjab, India. 143518
Item added to cart.
0 items - 0.00