November 28, 2019
5 min Read
Freddy M.
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.
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:
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.
Let’s go over each of the causes and try various solutions to fix the issue.
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.
You can do so through the File Manager on your hosting control panel:
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:
If the error appears again after you’ve just activated a certain plugin, it’s clear that the plugin is the culprit.
Once you’ve performed all of the steps above, the 503 WordPress error should disappear, and you can reaccess your website.
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.
Disabling your WordPress theme via File Manager is similar to deactivating your plugins:
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:
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.
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.
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:
define ('WP_DEBUG', true); define ('WP_DEBUG_LOG', true); define ('WP_DEBUG_DISPLAY', false); @ini_set ('display_errors', 0);
If you’ve set a WP_DEBUG line within your wp-config.php file, activate it by changing the value from false to true.
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.
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.
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.
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.
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.
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:
If you have any questions, drop a comment below. Good luck!
LEAVE A REPLY