How to Fix Maximum Execution Time Exceeded Error Using wp-config.php

How to Fix Maximum Execution Time Exceeded Error Using wp-config.php

Every time you encounter with a WordPress error, it may seem like giving up on the platform. But as you know, WordPress is one of the most amazing (CMS)Content Management Systems you can ever come across; you need to learn the basics.

There are some common WordPress errors, in which Maximum Execution Time Exceeded is also on the list. Such an error occurs when a plugin or a theme takes more than default execution time to get installed or updated.

I remember when I used to see such an error on a regular basis. And if you do some research, you can find different ways to fix it.

Most of the people use the .htaccess file, but for beginners, a WordPress plugin is a savior. If you’re also thinking about using a plugin, install and activate the WP Maximum Execution Time Exceeded plugin.

But today, I am going to walk you through a different way using the wp-config.php file. You should also know that you can also fix the Maximum Execution Time Exceeded error using the PHP.ini file, but for now, focus on wp-config.php.

Edit the wp-config.php File

There are two different methods to edit wp-config.php. If you have an FTP account, you can use it. But today, I am going to show you the process using cPanel.

A few years ago, people used not to get cPanel access, but now almost every web hosting company offer cPanel, even with their starter plan.

Don’t fret when you see so many options. I understand, it can be overwhelming for a beginner, but there is nothing so complicated as you think.

Let me start the procedure.

Step 1:

First of all, you need to open the cPanel account your web hosting offers. Search for the File Manager icon, usually located in cPanel’s Files section.

How to Fix Maximum Execution Time Exceeded Error Using wp-config

It’s possible that you may see something different because of the cPanel layout. Siteground, Bluehost, Inmotionhosting, Hostinger, and all the major companies have the similar options in cPanel.

You can easily find the file manager. Click File Manager to open it.

Step 2:

As you know, the data of your website resides in the root directory, you need to open public_html. When you open the file manager, most likely, you may see the home directory.

How to Fix Maximum Execution Time Exceeded Error Using wp-config

Navigate to public_html from the vertical sidebar on the left-hand of the screen. When you click, you can see all the files and folders of your WordPress website.

Note: While hosting multiple websites on the same server, you need to open the folder of the site you want to fix an error for.

Step 3:

Search for the wp-config.php file and right-click to edit. As usual, you can also use the traditional Edit option from the main navigation menu of cPanel.

How to Fix Maximum Execution Time Exceeded Error Using wp-config

Step 4:

You can see a popup to confirm if you’re sure to edit the coding file. Click on the Edit button.

How to Fix Maximum Execution Time Exceeded Error Using wp-config

Note: Before you go further, it’s necessary to backup your WordPress site and sites database, to be safe.

Step 5:

A new tab opens up, and you can see tons of coding lines. But you don’t need to edit any existing code, add one line of the code and save the file.

set_time_limit(300);

This code sets the execution time to 300 seconds; it’s more than enough. If you still think you require more time than 300 seconds, you can add 600.

But if you use a well-coded plugin, it doesn’t take that much of time. So, it’s better to keep the value to 300.

Click on the Save Changes button in the top-right corner. Try installing, updating your plugin or theme. If you succeed, congrats, you have successfully solved the error.

Fix the Maximum Execution Time Exceeded Error

As you know, to fix a technical issue, you may find multiple alternative methods, but the best thing is to follow the right procedure.

You can either edit the .htaccess or the wp-config.php file, the code is different, but the result is the same.

Do you think you can edit the wp-config.php file using cPanel or through FTP?

Conclusion

Every now and then, people start making guesses about the complexity of the WordPress platform, but it’s easy if you try to learn.

Fixing the Maximum Execution Time Exceeded error is easy. You can see the proper steps. I hope you can easily accomplish such a task.

Check out these top 3 WordPress hosting services:

A2 Hosting
£1.46 /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
£0.75 /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
£0.71 /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 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

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

This how-to guide provides the solution to fix Maximum Execution Time Exceeded e
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

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 Force www or non-www of Your WordPress Website Using

This how-to provides an explains to make a redirect from non-www to www or vice
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