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

Coming across an fault like this may throw you lot off balance. There's skillful news equally this is a common mistake. Information technology doesn't occur often, but when it does, there are several quick solutions.

Let'due south dig in!

Prefer to sentry the video version?

What's the WordPress max_execution_time Error?

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

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

The entire mistake message reads:

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

The xxx seconds value can exist any number. Ordinarily, it'due south betwixt 30 and 60 seconds. This fault is prone to pop up when installing or updating themes, plugins, or WordPress core.

Don't let the WordPress 'max_execution_time' fatal fault throw you lot for a loop. 🤯 At that place are several quick and easy solutions to get you dorsum on rails 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's meant to minimize server abuse. 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, information technology'due south essential to keep an heart on PHP scripts to run across if they run for too long and eat upwards too many server resources. It's not uncommon for malicious attacks to use neverending PHP scripts to bring the site to a crawl.

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

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

What's the Standard Maximum Execution Time Limit?

Nearly hosting companies enforce a max execution time that's anywhere between 30 and threescore seconds. This range gives your PHP scripts enough time to complete their jobs, fifty-fifty if they take some time to execute.

In general, a 30-second fourth dimension limit should piece of work well for high-quality PHP scripts. However, you may need to increase the limit to 60 seconds, depending on your lawmaking and server response. Some developers may opt for every bit much every bit a 300-second maximum, but anything over that isn't a wise decision.

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

Yep—some resource-heavy websites can't help but attain longer execution times. Nevertheless, it would be best to assume that maybe a plugin, theme, or other integration is causing the problem before jumping to different, less savory conclusions. It'due south besides possible your site may require a more powerful server, especially if you currently utilize a shared hosting setup.

Sometimes hosting companies may set the maximum execution time too low for your site. Information technology'due south a pretty common situation, and you can resolve it by reaching out to your hosting provider.

But It Says "Fatal Error": That Sounds Bad

The "fatal error" text sounds urgent, but your website isn't at take chances of never working once again. The max_execution_time WordPress mistake is one of the virtually 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 problem—you could lose sales, leads, or readers if the warning message blocks your content and remains active for any length of time.

How to Effigy out if a WordPress max_execution_time Error Occurred

The primary way to encounter if you've exceeded the maximum execution time is by checking for the bulletin in your dashboard while uploading a plugin, theme, or WordPress update.

The installation or update page renders information about the change and gives you a "Success" or "Failure" message. The "fatal fault" message is an choice as well.

WordPress max_execution_time error
Fatal mistake message within the dashboard

Some other way 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 bulletin about technical difficulties

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

alternative WordPress max_execution_time message
Alternative frontend message on newer WordPress versions

Finally, WordPress usually sends the site admin an email explaining that a plugin or theme has caused a fatal mistake. The email will also provide a link to aid you find a solution to the problem, ordinarily by deleting the problematic plugin or theme or increasing your maximum execution time limit.

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

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

How to Fix the max_execution_time WordPress Error

Equally mentioned, the max_execution_time WordPress error appears after a plugin, theme, or WordPress update takes as well long to run a PHP script.

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

WordPress in recovery mode
Recovery Mode allows yous to access the dashboard and remove bug like plugins.

There are several ways to prepare the max_execution_time WordPress error:

  • Identifying and uninstalling the plugin, or theme, or other resources that acquired the mistake in the start place. It'south done in Recovery Fashion or by removing the plugin via FTP.
  • Increasing the max execution fourth dimension 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.
  • Request your hosting provider to increase the maximum execution time.

Uninstalling a plugin or theme is often the fastest method, only 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's only a suitable choice if you decide you're willing to find a replacement for the offending plugin or theme.

If yous'd instead increase the max execution time to allow room for a plugin or theme, motility onto the following sections.

Those interested in removing the problem item (e.g., theme or plugin), follow the directions beneath.

To brainstorm, do your best to identify where the trouble's coming from with the following methods:

  • Uninstall the virtually recently installed detail, especially if the error occurred right after installing a plugin or theme or updated to the nigh recent version of WordPress.
  • Check your e-mail inbox to run into if WordPress sent you an email about the fatal fault. Sometimes they include data about which plugin caused the problem in the first identify.
  • If you lot have no idea which item caused the error, we recommend deactivating each plugin, and so reactivating them 1 by 1, refreshing each time to catch which 1 creates the error.

After you identify the problem particular, you should uninstall it from your WordPress site.

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

Uninstalling via the dashboard makes the most sense for rapid removal, just uninstalling a plugin or theme via FTP comes in handy if you can't gain access to the WordPress dashboard. You also take the option to get into the dashboard using Recovery Mode. WordPress includes a link to the Recovery Mode in the email yous'll receive.

Subscribe Now

Finally, y'all may find that a recent WordPress version upgrade acquired the mistake. Apply our guide on how to downgrade the WordPress version to troubleshoot this. In general, the WordPress version shouldn't be the root crusade—information technology'due south usually 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 than time to work.

Again, the maximum execution time is there for the security of your site and server, so it's best not to increase it to suit a poorly coded plugin or theme. However, yous may find that your hosting company sets short execution times, or you may need a little extra time.

In those cases, it's acceptable to increment the max execution time to become rid of the WordPress max_execution_time fault and to minimize the chances of the error coming up again in the time to come.

One way to change the max execution fourth dimension is by installing a plugin via your dashboard that makes changes to configuration files without y'all going into the WordPress files. We like this option for those not comfortable using an FTP client, but but if you have access to the site's dashboard.

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

Some other plugin that's focused exclusively on the max execution time is called WP Maximum Execution Time Exceeded. Nosotros recommend trying this 1 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 do on your end; install and activate the plugin to make it work.

only install the plugin to solve WordPress max_execution_time
You only demand to install and actuate the plugin—zilch more than

By default, the plugin provides a 300-second delay instead of whatever you lot had in the first place, which should requite your site'due south theme and plugins more than than enough time to run their PHP scripts.

Finally, uninstall the plugin if y'all always desire 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.

Equally for handling the WordPress max_execution_time error, one way to solve the issue requires you to open the wp-config.php file.

Open up an FTP connection to your WordPress files. Find and open up the root folder (usually named afterward your site) and click on the /public folder.

The /public folder contains an extensive collection of core files, including wp-config.php.

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

Find the wp-config file
Detect the wp-config file.

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

          set_time_limit(300);        

Information technology usually doesn't thing where you identify the code as long equally information technology doesn't alter anything already in the file. Nosotros recommend finding the last area correct before "cease editing" and putting the code right there.

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

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

To brand sure it worked, get back to WordPress to see if everything is now functioning. If the error doesn't appear when you attempt to upload a plugin or theme, you've succeeded.

How to Increase the Max Execution Time in .htaccess

Kinsta doesn't provide a .htaccess file since nosotros utilise more than performance-friendly Nginx servers, which don't require .htaccess files. Yous tin can learn all about Kinsta'southward reasoning for this, forth 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 within your root WordPress binder.

You can discover that file much similar you would the wp-config.php file: past connecting to your site via FTP and looking under the /public binder.

Once again, yous won't be able to find it if y'all'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
Find and click .htaccess

Information technology'due south essential to fill-in your .htaccess file earlier editing it. Read this tutorial on how to backup your WordPress files.

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

Add together this line to the file:

          php_value max_execution_time 300        

Feel gratuitous to alter the number to whatever maximum execution time yous desire. Delight save the file and upload it back into the /public binder in the FTP client. Finally, become dorsum to your website to check if the matter has been resolved.

How to Increase the Max Execution Time in php.ini

Some other file that's non equally common with web hosts is called php.ini. It'southward some other option for increasing your execution maximum, only more often than not, you'll have an easier time using the wp-config.php method.

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

Much like the other methods, you lot tin usually find the php.ini file in the /public folder. Admission this by going through an FTP client.

Open that file for editing.

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

Add this line to increment the max execution time:

          max_execution_time = 300        

As always, modify the number to meet your own needs, and remember to examination out if it worked by re-uploading the problem item and checking to see if all error messages have gone away.

Contact Your Hosting Provider to Asking an Increase in Maximum Execution Time

Running a WordPress site on a dedicated server ways you have consummate control over the maximum execution time. Therefore, the previous methods should work. Y'all also may notice that y'all 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 being shared with many other apps and websites.

If you either don't want to mess with information technology or you're having trouble increasing the max execution time, you must contact your hosting provider and request they increment information technology for y'all.

Achieve out to your host's back up team and tell them you see the WordPress max_execution_time error. Then, inquire what your electric current max execution time is. Finally, request that they increase your limit, preferably to somewhere between sixty and 300. Remember that you should remove any plugin or theme that takes longer than that.

Raise your hand if yous've always seen this error 🙋‍♀️ Learn how to fix it chop-chop with assist from this post ✅ Click to Tweet

Summary

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

You lot may run into this error inside the WordPress dashboard, along with a potential "technical difficulties" message on the frontend and an e-mail from WordPress almost the situation.

It'due south a super common mistake. By following the steps we've covered here, you can have your site running commonly again in a matter of minutes.


Salve time, costs and maximize site performance with:

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

All of that and much more, in i plan with no long-term contracts, assisted migrations, and a thirty-day-money-back-guarantee. Cheque out our plans or talk to sales to find the program that's correct for you lot.