How to Debug and Fix 503 Service Unavailable Error in WordPress
access_time
hourglass_empty
person_outline

How to Debug and Fix 503 Service Unavailable Error in WordPress

Are both of your WordPress site and admin area showing a white screen with a “503 Service Temporarily Unavailable” error message? Well, don’t panic just yet. In this tutorial, we will be showing you how to debug and fix the 503 WordPress error.

What Does 503 Service Unavailable Error in WordPress Mean?

The “503 Service Unavailable Error” means that your website is live, but the server cannot be reached because of a particular reason. It makes both your front end and admin dashboard inaccessible.

Depending on the server configuration, the error can be displayed differently. For example, you can see these error codes instead:

  •     503 Service Unavailable
  •     Http/1.1 Service Unavailable
  •     HTTP Server Error 503
  •     503 Error
  •     HTTP 503
  •     HTTP Error 503

The causes of it may vary. From buggy plugins or themes, a misbehaving custom PHP script, to server-side issues. However, you don’t have to worry as fixing a 503 service unavailable error is relatively easy.

Causes and Solutions of 503 Service Unavailable Error in WordPress

Let’s go over each of the causes and try various solutions to fix the issue.

Buggy Plugin

If you encountered the 503 error after installing or updating a particular plugin, you might have found the culprit. Just delete the plugin to solve it.

However, if you don’t know which plugin is causing the 503 error, you should diagnose the root of the problem by disabling all plugins.

Deactivating All WordPress Plugins

You can do so through the File Manager on your hosting control panel:

  1. Access the hPanel, then head over to File Manager under the Files section.
    Accessing the file manager on hPanel
  2. Select Go To File Manager -> public_html -> wp-content folder.
  3. Locate the plugins folder and right-click.
  4. Rename it into pugins_disable to deactivate all plugins at once.
    Right click on the plugins folder and rename it to fix 503 Service Temporarily Unavailable error
  5. Rename the plugins_disable folder back to its original name, plugins.
  6. Reload your website and access your wp-admin area.

If the 503 error is gone, a specific plugin may be the troublemaker. All you have to do is identify and delete the problematic plugin from your admin dashboard by following these steps:

  1. Log in to your WordPress dashboard and head over to the Plugins -> Installed Plugins section.
    Accessing the WordPress admin dashboard to activate the installed plugins
  2. Activate the plugin one by one and reload your site each time to pinpoint the buggy plugin.

    If the error appears again after you’ve just activated a certain plugin, it’s clear that the plugin is the culprit.

  3. Delete the faulty plugin by accessing the public_html/wp-content/plugins folder from your File Manager.
  4. Let’s say the problematic plugin is disable-comment, right-click on the folder and select delete from the drop-down menu.
    Right click on the problematic plugin and delete it to fix 503 wordpress error

Once you’ve performed all of the steps above, the 503 WordPress error should disappear, and you can reaccess your website.

Problematic WordPress Theme

If your plugins are not causing the error, your theme might be the root problem. Especially if you got the 503 error after installing a new theme.

To tackle this issue, switch to a default WordPress theme, such as the Twenty Seventeen, Twenty Sixteen, or Twenty Nineteen theme.

It’s advisable to keep the default theme even after installing new themes since it acts as the fallback theme whenever your new themes fail.

Deactivate WordPress Theme through File Manager

Disabling your WordPress theme via File Manager is similar to deactivating your plugins:

  1. Under the Files section on you hPanel, access File Manager -> Go To File Manager -> public_html -> wp-content folder.
  2. Find the themes folder, and rename your currently used theme.
  3. Let’s say you’re activating my-theme, right-click on the folder and rename it into my-theme-off. Your theme will switch automatically to the default WordPress theme.
    Right click on the corrupted theme folder and rename it
  4. Reload your website to see if it’s working.

Deactivate WordPress Theme through phpMyAdmin

If you don’t remember the name of the theme that you’re using, worry no more. Follow these steps on your hPanel’s phpMyAdmin menu to deactivate your currently used theme and switch it into one of the default ones.

Here, we’ll change it into the Twenty Seventeen theme:

  1. Open your hPanel, then go to phpMyAdmin under the Databases section. Select Enter phpMyAdmin.
    Access the phpmyadmin databases
  2. Find the template and stylesheet values within the wp_options table.
  3. Your currently used theme name is on the option_value column. Double-click on the name, and rename it to twentyseventeen.
    Switching your theme into Twenty Seventeen by renaming the option value of your template and stylesheet to fix 503 Service Temporarily Unavailable wordpress error
  4. Reload your site once you’re done.

If the 503 WordPress error disappears after deactivating your currently used theme, try to update the theme if you still want to use it in the future. Otherwise, it’s better to get a different theme.

Faulty Custom PHP Code

If the 503 service unavailable error persists, perhaps a broken custom PHP code snippet somewhere on your website is responsible for it.

But how do you determine which third-party code snippets are the problematic ones?

For this reason, try debugging your site to diagnose and fix the troublemaker.

Enable WP_DEBUG

Since the 503 WordPress error often locks you out of your admin area, activate the WP_DEBUG mode from your File Manager, so you can check the error logs. Follow these steps to do so:

  1. Go to your hPanel, and navigate to File Manager -> Go To File Manager -> public_html folder.
  2. Locate and open the wp-config.php file.
  3. Scroll down and add the following code right before the line /*That’s all, stop editing! Happy blogging.*/:
    define ('WP_DEBUG', true);
    define ('WP_DEBUG_LOG', true);
    define ('WP_DEBUG_DISPLAY', false);
    @ini_set ('display_errors', 0);

    Modifying the wpconfig file to enable the wp debug function to fix 503 Service Temporarily Unavailable wordpress error

  4. Save & Close the changes.

    If you’ve set a WP_DEBUG line within your wp-config.php file, activate it by changing the value from false to true.

  5. Reload your website, and it will showcase the error logs message.

You can see the error logs by accessing the /public_html/error_log file from your File Manager as well.

Now, all you have to do is solve the problem according to the instructions shown on the 503 WordPress error message.

Server-Related Issues

If the methods above still yield no result, the problem could lie in your web server. You can try these three server-side methods to solve the error.

Limit WordPress Heartbeat

WordPress Heartbeat is a built-in API that allows your site to have an autosaving post feature. This functionality consumes your server resources, but you can limit it with the Heartbeat Control WordPress plugin or disable it altogether.

To determine if WordPress Heartbeat is the cause of the “503 Service Temporarily Unavailable” error on your WordPress site, add the following code into your theme’s functions.php file right after the opening <?php tag:

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

Once you’ve saved your changes, reload your website and see if the error disappears. If it didn’t fix the 503 WordPress error, then the WordPress Heartbeat is not the root cause of the problem. So, don’t forget to remove the code from your functions.php file.

Limit Google’s Maximum Crawl Rate

Google and other search engines crawl your site to index your content – they visit your website regularly to gather content and determine other ranking metrics.

This crawling process can take a toll on your server resources. Consequently, it may slow down your site and cause the 503 WordPress error.

Fortunately, once you’ve integrated your site to the Google Search Console, you can limit the maximum crawl rate. Do so from the Crawl Rate Setting page, or request Google to limit your site crawl rate.

The changes you make will be in effect for three months. Additionally, if you have non-WWW and WWW versions of your site, you have to do this for both.

Increase Server Resources

Are you getting the 503 WordPress error consistently? If so, check your Google analytics. If you’re getting more traffic than usual, you’re definitely short of server resources.

However, if you don’t have the extra traffic but still see the 503 error, your problem might be an inadequate server RAM or memory.

It’s time to switch to a new WordPress hosting service or upgrade your hosting package if your current hosting plan does not accommodate a heavy resource usage.

Conclusion

503 WordPress Error is the most baffling error you’ve ever encountered as both of your front end, and back end area will not show its actual content. It is mostly caused by PHP code error from your plugins or themes.

Try these methods to solve the error:

  • Deactivating your WordPress plugins
  • Disabling your current WordPress themes
  • Enabling WP_DEBUG
  • Fixing the server-related issues

If you have any questions, drop a comment below. Good luck!

The Author

Author

Freddy M. / @freddymuriuki

Freddy is a WordPress theme reviewer at WP Theme Raves, a published WordPress blogger, web dev and founder of Vista Media Enterprises – an online business dedicated to WordPress users looking to boost conversion rates through content marketing. He shares his wealth of experience here.

Related tutorials

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Become a part of Hostinger now!

More in WordPress
The uploaded file exceeds the upload_max_filesize directive in php.ini. WordPress error and various ways of fixing it.
How to Fix the upload_max_filesize Error in WordPress

Close