If you have encountered the 503 service unavailable error in your WordPress website, there could be several reasons for that. It can be that the cause of the error occurs on your theme, plugin, PHP code, or web server. Regardless of the reason, you can always fix or debug the 503 service unavailable error. To help you with this problem, we will show you several ways to fix this error and let your website function perfectly again.
The 503 service unavailable error or HTTP error 503 is a problem that occurs when your website is live but your server cannot be reached due to an issue. It also makes your dashboard and frontend inaccessible.
You might see this WordPress error differently depending on the configuration of your server. The following are examples you might see on your screen:
Because there are several reasons for the HTTP error 503, we will provide a method or methods for each cause to fix the problem.
If you encountered the error after updating or installing a plugin, that simply means there is something wrong with the plugin you just activated or updated. The solution to this is simple: you need to disable or delete the plugin.
However, if you cannot identify which plugin is causing the error, you should disable all your plugins and then enable them one by one. You can easily do this through your control panel.
Log in to your control panel and go to File Manager, which is under the Files section.
Go to the public_html directory and select wp-content.
Select the plugins folder and right click on it.
Choose Rename from the dropdown and rename the folder to deactivate the plugins in your website. You can rename the folder as plugins_disable.
If you check your WordPress website and navigate to Plugins, you will see that all your plugins are deactivated.
After checking, you can go back to your public_html directory and rename the folder back to plugins.
Go back to your website and refresh it. Go to Plugins from your Dashboard menu and activate each plugin.
After you activate a plugin, make sure to reload your website to identify if it causes the issue. Once you see which plugin is faulty, delete the buggy plugin through your control panel. To do this, go back to your public_html directory and go to the plugins folder in wp-content.
Locate the buggy plugin and then right click on it once found. Select Delete to remove the plugin completely.
Go back to your WordPress website and refresh it. By then, the error should be gone, and you can already access your website without any issues.
Your theme can also be the cause of the error, especially if you see the HTTP error 503 after installing a theme. To resolve this issue, you must switch to a different theme or the default one. Make sure that you keep the default theme because it can be useful once your other themes encounter issues like this one.
After switching to a different theme, you can start configuring the backend of your website to fix the error. What you need to do is deactivate the faulty theme through the File Manager in your control panel.
Log in to your control panel and go to File Manager. Got to public_html and then wp-content.
Click the themes folder and select the faulty theme. Right click on the theme and select Rename. This automatically switches your theme to the default one.
Go back to your website and refresh it. You will see the default theme is working.
There is also another way to deactivate your theme, especially if you do not remember the name of the theme you are using. Go back to your control panel and type phpMyAdmin on the search box.
Click the icon once it appears on the results page.
On the left side of the page, click the option that has your website name. Look for wp_options or wpgz_options and select it.
Find the template and stylesheet options on the right side of the page. You might need to click the next page to find what you are looking for.
Once found, you can check the name of your theme under the option_value column, in the same rows as template and stylesheet.
Double click on the name of the theme and rename it to the theme you want to use. Go back to your website and refresh it to see the changes.
A broken PHP code can be the cause of the 503 service unavailable error if the problem persists. To know if the root cause deals with the PHP code, try debugging your WordPress website through your control panel.
Log in to your control panel and go to File Manager. Go to public_html and select the wp-config-php file.
Right click on the file and select Edit.
On the edit page, find this line:
/* That’s all, stop editing! Happy publishing. */
Add the following code before the above line:
define (‘WP_DEBUG’, true);
define (‘WP_DEBUG_LOG’, true);
define (‘WP_DEBUG_DISPLAY’, false);
@ini_set (‘display_errors’, 0);
Click Save Changes at the upper right side of the page and close the edit page.
If you already have the WP_DEBUG line in your wp-config-php file, activate it by replacing false with true.
Go to your website and refresh it. It will give you the error logs message.
If the 503 service unavailable error still appears after doing the previous methods, it can be that the cause lies in your server. You can fix the error in three ways:
WordPress Heartbeat is an API built on your website that allows your posts to autosave. It is a useful feature for your website, but it consumes a lot of resources on your web server.
To resolve this problem, go to Appearance from your Dashboard menu and select Theme Editor.
On the right side of the page find the functions.php file.
Add this code to the file after the “<?php” opening tag:
add_action(‘init’, ‘stop_heartbeat’, 1);
Click Update File at the bottom of the page to save the changes. Refresh your website to see if the error is gone.
If the error is still there, then WordPress Heartbeat is not the cause. Make sure to remove the code from the file and save changes if this is the case.
Search engines like Google regularly crawl your website to index your content for search results ranking. This activity can cause your site to slow down, resulting in the 503 service unavailable error.
You can restrict bots’ crawl rate once you combine your WordPress website with Google Search Console. You can configure the settings page of your console or request limitations from Google.
You can also check your Google Analytics if the cause for the 503 service unavailable error is server-related. If you have more traffic than usual, then your web server resources might be exhausted.
But if your traffic is still the same and you encounter the error, it might be that your server memory is not enough. If this is the case, you might need to upgrade to a higher web hosting plan or switch to another web hosting provider.
You should not panic if you see the 503 service unavailable error in your WordPress website. Although the cause deals with a plugin or theme you are using, the PHP code, or web server, there are ways you can follow to fix the error regardless of the cause.
You just need to be patient to detect server-related issues, enable WP_DEBUG mode, disable your theme, or deactivate your plugins. So, use our guide to fix the HTTP error 503 now and make your WordPress website work again without interruptions!