How to Solve "Maximum Execution Time Exceeded" Error of a WordPress Website

How to Solve "Maximum Execution Time Exceeded" Error of a WordPress Website

How do you feel if you get an error while updating your WordPress theme or any of the plugins? Isn’t that devastating when everything seems to fall apart?

Well, most of the WordPress users fret when they encounter with a maximum execution time exceeded error, they don’t even try to find out its reasons and solutions.

Every time I hear a complaint from someone, I always try to dig if the person has put some efforts or not. For non-techie people, it’s a nightmare to get such an error.

In this article, you’re going to learn the reasons and possible solutions to fix the “maximum execution time exceed” error.

Let me start explaining. WordPress is a PHP-based platform and to protect the webserver abuse, web hosting companies set the limitations for PHP scripts to execute.

If a WordPress theme takes more time than the set limit, an error occurs.

Depending on your web hosting, the PHP execution time may vary. As you know, some people prefer to managed hosting over shared hosting, it’s because managed hosting has more resources.

To fix this error, you require to increase the execution time limit.

Use the .htaccess File to Fix Maximum Execution Time Exceeded Error

Once in a while, you come across the usage of the .htaccess file, because it’s one of the most prominent files in your WordPress directory.

If you’re wondering about avoiding code editing, you can also use a plugin to increase the execution time limit. Try WP Maximum Execution Time Exceeded.

But if you can fix an issue by adding a small code to one of the files, you don’t need an extra plugin.

As people say, more plugins lead to a slower website, and I am sure, you don’t want that. So focus on editing the .htaccess file.

Follow these steps.

Step 1

Login to the web hosting account and open cPanel, search for the File Manager icon under Files. It’s one of the most used sections.

 

How to Solve

All the data of your website is available in the file manager.

Step 2

You need to make sure, you open the public_html/root directory, where your website’s data is present.

How to Solve

If you’re fixing an issue for an addon domain or a sub-domain, you may need to find the correct folder. But if you have only one website on your server, you can see all the files and folders including the .htaccess file.

Step 3

Right-click to edit, or you can use the Edit option showing on the horizontal navigation menu.

How to Solve

Step 4

The server needs a confirmation to edit the file by showing a popup.

Click Edit and a new tab appear to you, it consists of the rewrite rules for your WordPress website including many others.

Step 5

Add the code before #End WordPress.

php_value max_execution_time 300

This code increases the PHP execution time to 300 seconds. Click Save Changes from the top-left corner and try checking your website.

If everything works, congrats, you have successfully fixed the maximum execution time exceeded error, but if you still get it, you can replace 300 with 600.

Sometimes, a plugin update or any other PHP script requires more time than expected. If nothing works, you should contact your web hosting customer support, sometimes, the company doesn’t allow its users to modify the default settings.

I remember when I was trying to increase the default file upload time for WordPress, the code was denied. Make sure, it doesn’t happen to you.

Isn’t that a Piece of Cake to Fix an Error

WordPress may seem tricky, but once you get along, you can easily find a solution to almost every error. I understand, it’s hard for non-techie people to deal with codes, but at least they can copy and paste.

I used to be like everyone else, with a fear of codes, even if you don’t like to deal with them, you should understand the need of knowing about the .htaccess file.

You can fix most of the common WordPress errors using .htaccess. In the last couple of years, the web hosting companies have made it convenient to access it through cPanel.

Conclusion

I hope you have understood the need to increase the PHP execution time limit, if you feel that 300 seconds aren’t enough, you can replace the value to 600.

But if you think practically, no PHP script takes 5 minutes to execute. Make sure your website isn’t compromised. best of luck.

Check out these top 3 WordPress hosting services:

A2 Hosting
$1.95 /mo
Starting price
Visit A2 Hosting
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.8
  • Pricing
    4.0
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Webdock
$1.05 /mo
Starting price
Visit Webdock
Rating based on expert review
  • User Friendly
    3.8
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.3
  • Pricing
    4.3

How to Fix Image Upload Issue of Your WordPress Website Using FTP

This how-to guide explains the cause and solution of image upload error for a Wo
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

How to Deactivate All Plugins Using phpMyAdmin

This how-to guide explains the easiest way to deactivate all plugins using an SQ
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

How to Enable Error Reporting Using the php.ini File Using cPanel

This how-to guide explains the essential steps while troubleshooting and how you
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

How to Add a WordPress Administrator User Using PHP Code

This how-to guide explains a different way to create a WordPress administrator u
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top