Running into errors on your WordPress site tin be intimidating. However, most errors requite yous some inkling equally to what acquired them, which can make troubleshooting these common issues a lot easier. The 503 fault is not as polite, unfortunately, and doesn't give y'all much information to get on.

It helps to understand what the virtually common causes are for the 503 error in WordPress. Later on that, you'll need to be methodical when it comes to troubleshooting the error, which means following several steps in order to locate the root cause.

In this commodity, we'll comprehend what the 503 error is and how it typically manifests. Then we'll guide you through six steps in order to troubleshoot it. Permit's get to work!

What Is an HTTP Error 503?

The Internet Applied science Task Force (IETF) defines the 503 Service Unavailable as:

The 503 (Service Unavailable) status code indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely exist alleviated after some filibuster. The server MAY transport a Retry-After header field to suggest an appropriate amount of time for the client to expect before retrying the request.

When you encounter the 503 error, it means that the server in question is unavailable. That could exist considering it's as well decorated, for example, or it's under maintenance. Unlike other similar mistake codes, 503 signifies that your website is online and running, but can't be reached at the present moment.

What'south so vexing about this detail error is that it barely gives you any information to become on. Most of the time, information technology just shows up with a "Service temporarily unavailable" message. That'south the equivalent of calling a eating house via phone, simply to accept them tell you that they're closed but refuse to let you know when they'll be open again.

If y'all're lucky, the 503 error code volition have occurred because your WordPress website is under maintenance. WordPress very briefly sets your site to maintenance mode when you're updating a plugin, a theme, or the core software:

HTTP 503 Error in WordPress
Maintenance mode

Usually, this timeout is so brief that no ane will discover information technology. However, in those cases where the 503 error persists, you'll take a bigger problem to deal with. After all, not only volition users be unable to visit your site, but you'll lose admission to your WordPress admin expanse as well. That ways you can't update your site in any mode, and in club to troubleshoot it, y'all'll need to dig into its files.

Check Out Our Video Guide to The 503 Error

503 Error Variations

The 503 error can show up in a lot of means. Yet, almost every variation comes accompanied by that 503 lawmaking, making it easy to place.

Here are some of the variations y'all might encounter, depending on your server configuration and browser:

  • 503 Service Unavailable
  • 503 Service Temporarily Unavailable
  • HTTP Server Error 503
  • HTTP Error 503
  • Fault 503 Service Unavailable
  • The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try once more later.

Whatever the lawmaking you come across might wait like, it means you need to get to work fast before it affects your users negatively.

Accept you e'er see the 503 error in WordPress? That's a bummer! 😱Follow these 6 steps to set up it and go your site dorsum online in no seconds! Click to Tweet

How to Prepare the 503 Error in WordPress (6 Steps)

Since you lot often can't be sure what caused the 503 error in whatsoever given situation, you lot'll need to get about troubleshooting it methodically. The following six sections each cover a potential fix, aimed at resolving the different potential root causes.

After each stride, have a moment to return to your website and see if the 503 error is gone. If it is, yous've successfully stock-still the consequence. If not, continue on to the next footstep in the process.

1. Temporarily Deactivate Your WordPress Plugins

Ane of the most common causes of the 503 fault in WordPress is plugin compatibility issues. To determine if that's what's happening, yous'll need to disable all of your site'southward plugins.

Since the 503 error prevents you from accessing the WordPress admin area, you'll need to apply an FTP client for this stride. If you don't accept one fix, we recommend FileZilla.

One time your FTP client is set up, connect to your website through information technology and navigate to your WordPress root folder. In case y'all can't discover it, it's usually called public_html, html, public, www, or your site's name. If you're a Kinsta client, it's your public folder.

WordPress root folder SFTP
WordPress root folder SFTP

Open that folder, and navigate to the wp-content directory. Inside, yous'll encounter a folder called plugins, which contains private subdirectories for each of the plugins installed on your site (both active and inactive).

What you're going to do now is right-click on the plugins binder, and rename it to something else. We recommend plugins.quondam or plugins.deactivated, and so yous can easily recognize it afterwards.

WordPress plugins folder renamed
WordPress plugins folder renamed

WordPress will now not be able to discover whatsoever of your plugins. When that happens, it volition automatically disable those plugins.

Now, try accessing your WordPress dashboard. If the 503 fault is gone, and so you can assume that 1 of your plugins was the culprit. All you have to exercise is figure out which 1 was at fault.

Return to the wp-content directory, and rename your original plugins binder correctly. Then, yous'll need to disable each of your plugins i past one, until you observe the culprit.

To practise this, open up the wp-content/plugins directory. Inside, yous'll notice one binder for each of your plugins. The process y'all're going to follow is much the same as before:

  1. Start with the first folder, and rename it to anything you lot like.
  2. Cheque your website to encounter if the error is gone.
  3. If information technology isn't, return the plugin folder from the previous step to its original proper noun.
  4. Move on to the next plugin on your list, repeating the in a higher place steps.

This procedure can take a while if you lot take a lot of plugins, but information technology's vital to check each plugin in turn. If at any bespeak you place the plugin that's causing the fault, yous tin can uninstall information technology or replace information technology with another tool.

If you make information technology to the terminate of these steps without finding a solution, you tin move on to the side by side stage of troubleshooting.

ii. Deactivate Your WordPress Theme

At present that you've ruled out your plugins as the cause of the 503 error, it'southward time to practise the same with your active theme. In fact, your theme could too be creating compatibility issues.

Unfortunately, the process doesn't work the same as above. WordPress won't revert to the default theme if simply rename the theme folder, you would terminate up with an error like "The theme directory "theme name" does not exist." Or if you try to rename the entire theme directory folder, yous finish up with "Mistake: The themes directory is either empty or doesn't exist. Delight check your installation."

The theme directory does not exist error
The theme directory does not exist error

Therefore, you lot demand to access your WordPress database by logging into phpMyAdmin. If you're a Kinsta client, this can exist found inside the "Info" department of the MyKinsta dashboard.

MyKinsta phpMyAdmin
MyKinsta phpMyAdmin

Click into the "wp_options" table, then click on the "Search" tab. You volition want to search under the "option_name" for template.

Subscribe Now

phpMyAdmin wp_options table
phpMyAdmin wp_options table

Under the "option_value" cavalcade y'all volition see the current name of your theme. Change this to one of the default themes, such as "twentynineteen."

wp_options template name
wp_options template name

Cheque your website over again to see if this has stock-still the error. If information technology did, it simply means it's a problem with your WordPress theme and you lot might want to endeavor reinstalling it or reverting to your most contempo backup.

3. Temporarily Disable Your Content Delivery Network (CDN)

Sometimes, the 503 mistake will show upward not because of a problem on your website, but because of your Content Delivery Network (CDN). If y'all're using a CDN, a quick fashion to figure out if that'south the case is to temporarily disable it.

Every CDN should include some characteristic that enables you to pause its services. If y'all're on Kinsta, you can disable your Kinsta CDN past navigating to CDN → "Disable CDN" within your MyKinsta dashboard:

MyKinsta CDN enable/disable option
MyKinsta CDN enable/disable option

The process y'all need to follow may exist different depending on which CDN yous're using. Cloudflare has likewise been known to cause 503 errors sometimes. If y'all can't find the option to pause yours, bank check out your service's knowledge base of operations, which volition usually incorporate detailed instructions.

If you don't use a CDN or observe that pausing your service doesn't help with your effect, there are still a few more than fixes to effort. Do recollect to reactivate your CDN before moving on.

iv. Limit the WordPress 'Heartbeat' API

The WordPress Heartbeat is an API built into WordPress, which the platform uses for auto-saving content, showing you plugin notifications, letting you know when someone else is working on a post yous're trying to access, and more than.

But like a regular heartbeat, the API works in the background with a high frequency and so that it doesn't miss anything. As you might imagine, this API consumes server resources. Usually, that'southward non a trouble but in some cases, it may lead to a 503 mistake if your server tin't handle the load.

The quickest manner to determine if the Heartbeat API is at the center of your problems is to temporarily disable it. To do that, connect to your WordPress website via FTP again, so open your current themes folder and await for the functions.php file inside:

WordPress theme functions.php file
WordPress theme functions.php file

Correct-click on the file and select the View/Edit option, which will open it using your local text editor. Once it'south open, y'all'll demand to add the following code snippet within:

          add_action( 'init', 'stop_heartbeat', 1 ); function stop_heartbeat() { wp_deregister_script('heartbeat'); }        

Those three lines of code tell WordPress to disable the Heartbeat API. Salve the changes to the functions.php file, close it, and try to admission your website again.

If the 503 error is gone, y'all'll know that the API was the problem. Disabling it birthday removes a lot of useful functionality, however. Instead, nosotros recommend that you 'slow downward' the Heartbeat, so that information technology doesn't cause problems.

The easiest way to do that is past installing the Heartbeat Control plugin. Actuate the plugin and navigate to the Settings > Heartbeat Control section. Expect for the Modify Heartbeat options, and drop the frequency to the lowest possible number:

Heartbeat Control plugin frequency
Heartbeat Command plugin frequency

Relieve the changes to your settings and return to the functions.php file you tweaked a while back. For the higher up changes to work, you'll need to remove the string of code you lot added before and save your changes to the file.

At this stage, the 503 error should be gone if the Heartbeat API was the problem. If information technology isn't, so information technology'south time to attempt something different.

5. Increase Your Server's Resources

If the 503 error is withal occurring despite all your attempts to gear up it and so far, so there's a good chance the problem might exist due to a lack of server resource. That is to say, you'll need to upgrade your hosting program to see if that fixes the issue. This is peculiarly truthful if you're using inexpensive WordPress hosting, equally they tend to throttle resources. Nosotros don't do this at Kinsta.

Upgrading your program is a large determination, however. The smart move is to commencement contact your web hosting support service and hash out the 503 mistake with them, too equally the steps you've taken and so far to attempt and solve it. The support team should be able to assistance you lot piece of work out the cause and advise y'all on whether yous need to upgrade your programme or non.

6. Review Your Logs and Enable WP_DEBUG

You should too have advantage of your error logs. If you're a Kinsta customer, y'all can easily see errors in the log viewer and enable WordPress debug mode in the MyKinsta dashboard. This can help you quickly narrow downwardly the issue, peculiarly if it's resulting from a plugin on your site.

Check error logs for HTTP 503 errors
Bank check error logs for 503 errors

If your host doesn't take a logging tool, you can besides add the following code to your wp-config.php file to enable logging:

                      define            (            'WP_DEBUG'            ,            true            )            ;            ascertain            (            'WP_DEBUG_LOG'            ,            true            )            ;            define            (            'WP_DEBUG_DISPLAY'            ,            imitation            )            ;                  

The logs are typically located in the /wp-content directory. Inside it, look for a file called debug.log and open it upwards.

Others, like hither at Kinsta might have a dedicated folder called "logs".

WordPress error logs folder (SFTP)
WordPress error logs binder (SFTP)

Interpreting your debug log tin be a bit intimidating simply it's non as hard to read as y'all might imagine. In a nutshell, the log contains each error that pops upward on your site in chronological order. Information technology shows which file caused each error, also as which specific lines of lawmaking were involved.

Beware: y'all're not going to detect direct references to the 503 error within your log. All the same, if all else fails, it can bespeak you in the right direction by showing you what files are causing issues. That style, you'll know where to focus your efforts next. As we mentioned in the previous step, now is a good time to make it bear on with your hosting provider if you need farther assistance resolving this error.

You lot tin can also check the log files in Apache and Nginx, which are commonly located here:

  • Apache: /var/log/apache2/error.log
  • Nginx: /var/log/nginx/fault.log

To acquire more, please cheque out our web server showdown: Nginx vs Apache.

If you lot're a Kinsta client y'all tin can besides take advantage of our analytics tool to get a breakup of the full number of 503 errors and see how often and when they are occurring. This can help y'all troubleshoot if this is an ongoing effect, or perhaps something that has resolved itself.

If the 503 error is displaying because of a fatal PHP error, you can also endeavour enabling PHP error reporting. Simply add the post-obit lawmaking to the file throwing the fault. Typically you can narrow downwardly the file in the console tab of Google Chrome DevTools.

                      ini_set            (            'display_errors'            ,            i            )            ;            ini_set            (            'display_startup_errors'            ,            1            )            ;            error_reporting            (            E_ALL            )            ;                  

And you might demand to also change your php.ini file with the post-obit:

          display_errors            =            on        

Summary

If you're lucky, the 503 error will only show upwardly when y'all put your website into maintenance style. Even so, if it appears without warning, and so you'll have to roll upwards your sleeves and practice some troubleshooting.

To get at the root cause of the 503 fault, yous'll need to follow these steps to gear up information technology:

  • Temporarily deactivate your WordPress plugins.
  • Deactivate your WordPress theme.
  • Disable your CDN.
  • Limit the WordPress Heartbeat API.
  • Increase your server resource.
  • Review your logs and enable WP_DEBUG.

Have you lot ever run into the HTTP 503 fault in WordPress? Share your experiences with united states in the comments section beneath!


Salvage time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audition reach with 32 information centers worldwide.
  • Optimization with our congenital-in Application Performance Monitoring.

All of that and much more, in i plan with no long-term contracts, assisted migrations, and a 30-24-hour interval-coin-dorsum-guarantee. Bank check out our plans or talk to sales to detect the plan that's right for you lot.