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.


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?


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:

Was this article helpful?