You lot'll occasionally encounter errors or warnings in WordPress. One of these errors you may encounter is the WordPress max_execution_time fatal error.

Coming across an error like this may throw you lot off residual. There's proficient news as this is a common error. It doesn't occur often, but when it does, there are several quick solutions.

Let's dig in!

Prefer to watch the video version?

What's the WordPress max_execution_time Mistake?

The WordPress max_execution_time fatal error looks like this in your WordPress admin dashboard:

WordPress max_execution_time error
The maximum execution fourth dimension fault in the dashboard

The entire mistake bulletin reads:

          "Fatal Error:            Maximum execution time of thirty seconds exceeded"        

The xxx seconds value can be any number. Usually, it's between 30 and sixty seconds. This fault is prone to pop upwardly when installing or updating themes, plugins, or WordPress cadre.

Don't let the WordPress 'max_execution_time' fatal error throw you for a loop. 🤯 There are several quick and easy solutions to get you back on runway in no time ⬇️ Click to Tweet

Why Does the max_execution_time Error Happen?

Every WordPress site has a maximum execution time limit for processing server requests. It'south meant to minimize server corruption. This limit looks at all the PHP scripts running on your site and blocks those running past the time limit.

Because WordPress site files mainly use PHP, it's essential to keep an eye on PHP scripts to meet if they run for too long and eat up too many server resource. It'due south not uncommon for malicious attacks to apply neverending PHP scripts to bring the site to a crawl.

Besides, some plugins, themes, or other WordPress elements tin strain server resources if they take too long to run. Plugins seem to trigger this fault message more often than other elements—likely considering WordPress users install plugins more than frequently than they modify code or install themes. Furthermore, plugins come from all sorts of developers, so information technology's harder to check out the good ones backed by solid code and frequent updates.

Regardless of the crusade, there aren't many reasons to have a PHP script running for a significant corporeality of time; therefore, a maximum execution time limit is in place. Your hosting company commonly sets this limit at the server level.

What's the Standard Maximum Execution Time Limit?

Most hosting companies enforce a max execution fourth dimension that'south anywhere between 30 and threescore seconds. This range gives your PHP scripts enough time to consummate their jobs, even if they accept some fourth dimension to execute.

In full general, a thirty-second time limit should work well for loftier-quality PHP scripts. However, you may demand to increase the limit to 60 seconds, depending on your code and server response. Some developers may opt for every bit much as a 300-second maximum, but anything over that isn't a wise decision.

You may wonder: is information technology possible to accept a website where PHP scripts have longer, notwithstanding they don't cause any harm to the server?

Yes—some resource-heavy websites can't help simply achieve longer execution times. However, information technology would exist best to assume that maybe a plugin, theme, or other integration is causing the problem earlier jumping to different, less savory conclusions. Information technology's too possible your site may require a more than powerful server, especially if yous currently utilize a shared hosting setup.

Sometimes hosting companies may set the maximum execution time too depression for your site. It's a pretty common situation, and yous tin resolve it by reaching out to your hosting provider.

But It Says "Fatal Error": That Sounds Bad

The "fatal error" text sounds urgent, only your website isn't at risk of never working again. The max_execution_time WordPress error is i of the most common warnings seen in WordPress.

However, you may find a message on your site'due south frontend, telling users that the site is experiencing technical difficulties.

That'south a trouble—you could lose sales, leads, or readers if the warning message blocks your content and remains active for whatever length of time.

How to Figure out if a WordPress max_execution_time Error Occurred

The primary style to meet if yous've exceeded the maximum execution time is by checking for the message in your dashboard while uploading a plugin, theme, or WordPress update.

The installation or update folio renders information almost the change and gives you a "Success" or "Failure" message. The "fatal error" message is an option likewise.

WordPress max_execution_time error
Fatal mistake message inside the dashboard

Another style to identify a maximum execution error is by seeing the frontend message to users, which reads, "The site is experiencing technical difficulties."

frontend message for WordPress max_execution_time
Frontend message about technical difficulties

There are other variations of this message, some of which talk well-nigh critical errors and include a link to learn nearly debugging.

alternative WordPress max_execution_time message
Alternative frontend message on newer WordPress versions

Finally, WordPress usually sends the site admin an electronic mail explaining that a plugin or theme has caused a fatal mistake. The electronic mail will also provide a link to help you find a solution to the trouble, usually by deleting the problematic plugin or theme or increasing your maximum execution fourth dimension limit.

email from WordPress for WordPress max_execution_time
An email from WordPress on how to fix the max execution mistake

For all errors that result in "technical difficulty" messages, be sure to read our guide on resolving those problems. To focus on fixing the max execution time error in particular, though, read on.

How to Fix the max_execution_time WordPress Error

As mentioned, the max_execution_time WordPress error appears later a plugin, theme, or WordPress update takes too long to run a PHP script.

You'll see the fault notice in several areas. If you have trouble accessing your website, the fatal error email you lot received has a link to launch your WordPress example in Recovery Style.

WordPress in recovery mode
Recovery Fashion allows you to access the dashboard and remove problems like plugins.

There are several ways to prepare the max_execution_time WordPress error:

  • Identifying and uninstalling the plugin, or theme, or other resource that caused the mistake in the first place. It's done in Recovery Mode or by removing the plugin via FTP.
  • Increasing the max execution time in the WordPress dashboard through a plugin.
  • Modifying the maximum execution time in wp-config.php.
  • Increasing the max execution time in the .htaccess file.
  • Changing the max execution time in the php.ini file.
  • Asking your hosting provider to increase the maximum execution time.

Uninstalling a plugin or theme is often the fastest method, but we'll cover all the options below.

Uninstall the Problem Item

This solution removes the max execution error, but it doesn't increment the max execution time. Therefore, it'due south simply a suitable selection if you decide you lot're willing to find a replacement for the offending plugin or theme.

If you'd instead increase the max execution fourth dimension to allow room for a plugin or theme, move onto the post-obit sections.

Those interested in removing the problem detail (due east.grand., theme or plugin), follow the directions below.

To begin, exercise your all-time to identify where the trouble's coming from with the following methods:

  • Uninstall the about recently installed particular, especially if the mistake occurred right after installing a plugin or theme or updated to the most recent version of WordPress.
  • Bank check your electronic mail inbox to see if WordPress sent you an electronic mail well-nigh the fatal mistake. Sometimes they include information nigh which plugin acquired the trouble in the first place.
  • If you have no idea which item caused the error, we recommend deactivating each plugin, then reactivating them i by one, refreshing each time to catch which one creates the error.

After yous place the trouble item, you should uninstall information technology from your WordPress site.

To complete this process, read our article on uninstalling a WordPress plugin. The guide highlights how to remove a plugin using the dashboard, an FTP client, and more.

Uninstalling via the dashboard makes the most sense for rapid removal, but uninstalling a plugin or theme via FTP comes in handy if you can't proceeds admission to the WordPress dashboard. Yous likewise have the option to get into the dashboard using Recovery Style. WordPress includes a link to the Recovery Style in the email you'll receive.

Subscribe Now

Finally, you may find that a recent WordPress version upgrade caused the error. Use our guide on how to downgrade the WordPress version to troubleshoot this. In general, the WordPress version shouldn't be the root cause—it's unremarkably a plugin or theme that isn't working well with the new WordPress version.

How to Increase the Max Execution Time in WordPress (Using a Plugin)

Another option involves increasing the max execution time to requite the PHP scripts in your plugins and themes more fourth dimension to piece of work.

Again, the maximum execution time is there for the security of your site and server, and then it's all-time not to increase information technology to accommodate a poorly coded plugin or theme. All the same, you may find that your hosting company sets short execution times, or you may need a niggling actress time.

In those cases, it'south acceptable to increase the max execution fourth dimension to become rid of the WordPress max_execution_time mistake and to minimize the chances of the error coming upward again in the future.

One way to modify the max execution time is by installing a plugin via your dashboard that makes changes to configuration files without you lot going into the WordPress files. We like this selection for those not comfy using an FTP customer, but merely if you have access to the site's dashboard.

Some security and optimization plugins, similar Google PageSpeed Insights, accept options to increase the max execution time.

Another plugin that's focused exclusively on the max execution time is called WP Maximum Execution Time Exceeded. We recommend trying this one out since it automatically rewrites the .htaccess file to increase the maximum limits.

WP Maximum Execution Time Exceeded Plugin
WP Maximum Execution Time Exceeded plugin.

There's nothing to practice on your cease; install and activate the plugin to make information technology work.

only install the plugin to solve WordPress max_execution_time
You only need to install and actuate the plugin—nothing more

By default, the plugin provides a 300-second delay instead of any y'all had in the first place, which should give your site's theme and plugins more than enough fourth dimension to run their PHP scripts.

Finally, uninstall the plugin if you ever want to remove the increased fourth dimension limit.

How to Increase the Max Execution Time in wp-config.php

Each of the following methods taps into your core WordPress files. We recommend accessing your WordPress site files via FTP/SFTP and modify the content within them.

As for handling the WordPress max_execution_time error, one manner to solve the consequence requires you to open the wp-config.php file.

Open an FTP connection to your WordPress files. Detect and open the root folder (usually named afterwards your site) and click on the /public binder.

The /public folder contains an all-encompassing drove of core files, including wp-config.php.

Click on wp-config.php to either edit information technology directly in the FTP client or save it to your figurer for editing.

Find the wp-config file
Observe the wp-config file.

Place the post-obit fleck of code in the wp-congfig.php file:

          set_time_limit(300);        

Information technology usually doesn't matter where yous place the lawmaking equally long equally information technology doesn't modify annihilation already in the file. We recommend finding the last expanse right before "stop editing" and putting the lawmaking right in that location.

new time limit for WordPress max_execution_time
Set a new max execution time in wp-config

Later that, salve and upload the new wp-config.php file to your site via FTP. The new maximum execution fourth dimension for this instance is 300 seconds, but you can modify that number depending on what you demand.

To make sure it worked, go back to WordPress to see if everything is now performance. If the mistake doesn't appear when you try to upload a plugin or theme, you've succeeded.

How to Increase the Max Execution Fourth dimension in .htaccess

Kinsta doesn't provide a .htaccess file since nosotros use more operation-friendly Nginx servers, which don't require .htaccess files. You can learn all nearly Kinsta's reasoning for this, along with the benefits of Nginx, in this article.

Many other hosts—mainly shared hosting providers—still utilize Apache servers and therefore provide a .htaccess file inside your root WordPress binder.

You can find that file much like you would the wp-config.php file: by connecting to your site via FTP and looking under the /public folder.

Once more, you won't be able to find it if you lot're hosting your site on Kinsta. We recommend using the wp-config.php method for all Kinsta users.

htaccess to fix WordPress max_execution_time
Observe and click .htaccess

It's essential to backup your .htaccess file before editing information technology. Read this tutorial on how to backup your WordPress files.

Once backed up, open the .htaccess file for editing.

Add this line to the file:

          php_value max_execution_time 300        

Feel free to alter the number to whatsoever maximum execution time you lot desire. Delight salvage the file and upload it back into the /public folder in the FTP client. Finally, get back to your website to check if the matter has been resolved.

How to Increment the Max Execution Time in php.ini

Some other file that's not every bit common with web hosts is called php.ini. It'south another option for increasing your execution maximum, just more frequently than not, you'll have an easier fourth dimension using the wp-config.php method.

Yet, if you lot're sure a php.ini file exists in your root binder and the other methods don't work for some reason, consider borer into the php.ini file instead.

Much like the other methods, y'all can normally find the php.ini file in the /public folder. Access this past going through an FTP customer.

Open that file for editing.

locate the php.ini file
Locate the php.ini file

Add together this line to increment the max execution fourth dimension:

          max_execution_time = 300        

As always, alter the number to meet your ain needs, and recollect to test out if it worked past re-uploading the problem particular and checking to encounter if all fault messages have gone abroad.

Contact Your Hosting Provider to Request an Increase in Maximum Execution Fourth dimension

Running a WordPress site on a dedicated server ways yous have complete control over the maximum execution time. Therefore, the previous methods should piece of work. You also may find that you tin can manually change the max execution fourth dimension with other types of hosting like managed or VPS hosting.

Many shared hosting companies restrict your ability to modify the max execution time limit to protect the overall server beingness shared with many other apps and websites.

If you either don't desire to mess with it or you're having problem increasing the max execution time, you must contact your hosting provider and request they increase it for you.

Achieve out to your host's back up squad and tell them you see the WordPress max_execution_time mistake. And so, ask what your electric current max execution time is. Finally, request that they increase your limit, preferably to somewhere betwixt 60 and 300. Call up that you should remove any plugin or theme that takes longer than that.

Enhance your hand if you've ever seen this error 🙋‍♀️ Learn how to set up it apace with assistance from this post ✅ Click to Tweet

Summary

The WordPress max_execution_time mistake occurs due to ho-hum PHP scripts, most often appearing within plugins, themes, and the occasional WordPress version update.

You may see this error inside the WordPress dashboard, along with a potential "technical difficulties" message on the frontend and an email from WordPress about the state of affairs.

It'due south a super common mistake. Past following the steps we've covered hither, you tin take your site running ordinarily once more in a matter of minutes.


Relieve time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience accomplish with 29 data centers worldwide.
  • Optimization with our built-in Awarding Operation Monitoring.

All of that and much more, in one program with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to observe the plan that's right for yous.