The error message “503 Service Unavailable” is one of the most annoying errors that you have encountered at least once while operating websites other than those created with WordPress source code. In this tutorial, we will help you determine the cause of the error and how to fix the WordPress 503 service unavailable error.
There are many reasons for the error. We will point out the causes one by one and show you how to fix the 503 Service Unavailable error afterward.
Error due to WordPress Plugin Bug
Normally WordPress will not fail, if it fails you need to think about the plugins you just installed.
If you get an HTTP 503 error while installing a new plugin or updating plugins, this is the cause of the error. Simply delete this plugin and the error will be gone.
However, if you still can't determine which plugin is causing the error, please disable all plugins. Then reactivate the plugin one by one.
Disable All WordPress Plugins
You can delete WordPress plugins using File Manager on your hosting control panel. In this example, we will use CPanel's File Manager:
1. Log in to the Management section of your hosting, select File Manager or you can FTP access your account using FileZilla
2. Go to the WordPress installation directory, probably in public_html, you will see subdirectories like wp-admin, wp-content, wp-includes. Open the wp-content folder.
3. Choose to rename (rename) the plugins folder to plugins_disable.
4. This will help you disable all plugins currently installed in WordPress. Reopen the WordPress wp-admin admin page, if you can access it again, the main 503 service unavailable error is caused by a certain plugin.
5. Rename the plugins-old folder to the same plugins as before and reload the WordPress admin management page.
Now if the 503 error disappears, you just need to identify and remove the plugin causing the error from the admin dashboard by following these steps:
1. Log in to your WordPress dashboard and go to Plugins -> Installed Plugins section
2. Activate the plugin one by one and reload the page every time
NOTE: If the 503 Service Unavailable error appears after you activate a certain plugin, it is obvious that the plugin has a problem.
3. Remove the plugin causing the error by going to public_html/wp-content/plugins in the File Manager
4. In this tutorial, our buggy plugin is disable-comment — right-click and select delete from the drop-down menu bar.
After performing the above steps, the 503 Service Unavailable error will disappear, you can access the website again.
Theme error
If the check of all plugins completes but the error still persists, continue to do the same with the themes to find the cause. Especially after installing a new theme, I get an HTTP 503 error
To solve this problem, switch to the default WordPress theme, like Twenty Nineteen, or Twenty Twenty
Note : So we recommend that you always keep the default theme even when installing a new theme so that you can reuse it if something goes wrong.
Disable WordPress Theme Using File Manager
1. In the file section in CPanel, go to File Manager -> public_html -> wp-content/themes
2. Find the folder of the current theme you use, you can rename the theme you are using. For example, if you have a theme my-theme, right-click on that theme. Rename that theme folder to the name my-theme-off. Your WordPress theme will be switched to the default WordPress theme
3. Then reload the WordPress admin management page.
Disable WordPress Theme with phpMyAdmin
If you don't remember the name of the theme you are using, there is another way to disable the theme. We will do this by switching to the Twenty Seventeen theme
1. Open CPanel, then go to phpMyAdmin under the Databases section. Select Enter phpMyAdmin
2. Find template and stylesheet values in wp_options
3. Your current theme will be named in the option_value column. Double click on that name and change it to twenty seventeen.
4. Reload the site when finished to test the site again
Note: If the 503 WordPress error disappears after disabling the theme in use, try updating the theme again to the latest version. If not, you can choose another theme
Error 503 due to custom PHP code
If the plugins and themes test completes but your website still has an error, we will continue to check the custom PHP code that you have added to the website.
Enable WP_DEBUG
When the website has a 503 service unavailable error, you will not be able to access the WordPress admin management page, so you will not be able to use the support tools. At this point, the WP_DEBUG feature is really useful. You can enable WP_DEBUG in File Manager
1. Go to CPanel, go to File Manager -> public_html
2. Find and open the wp-config.php file in the WordPress installation directory.
3. Find WP_DEBUG, it will have the form define (‘WP_DEBUG', false); If you don't already have this entry, add it above /*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);
4. Once done, click on the Save & Close button
Important: If you have set WP_DEBUG in wp-config.php file, enable it by setting the value from false to true
5. Reload the web page, it will show you an error code
Note: You can also view the error logs in the /public_html/error_log file in the File Manager directory.
If you have performed the steps above the 503 service unavailable error code still persists, it could be server-related.
These errors can appear and disappear on their own after a few minutes when the server is stable, if the error does not fix itself, you can try some of the following solutions:
WordPress Heartbeat Limits
WordPress Heartbeat is the built-in API responsible for auto-saving posts, and related features in real-time. But you can also limit it with the Heartbeat Control WordPress plugin.
To see if WordPress Heartbeat is causing the 503 Service Temporarily Unavailable error, add this line of code in the functions.php file of your current theme right after the <?php tag
add_action('init', 'stop_heartbeat', 1); function stop_heartbeat(){ wp_deregister_script('heartbeat'); }
Save the file and reload your web page. If the site is working properly, great, you have fixed the error. If the error persists, remove this code from the functions.php file as WordPress Heartbeat is not the cause of the 503 error.
Googlebot Crawl Rate Limit
To index your website's content, Google and other search engines use specialized scripts commonly known as crawlers. They often visit your site to collect content and determine other ranking metrics.
This crawling process can increase resource consumption. As a result, it can cause HTTP error 503.
But if you have integrated your website into Google Search Console, you can limit the maximum crawl rate. To do so, go to the page settings page, or request Google to crawl rate limits on your site as follows:
1. Log in to Google Search Console and select Site Settings
2. Re-point the Google Craw rate by dragging the scale bar to the left
Increase server resources
If you get 503 Service Unavailable errors, check more websites on the Google Analytics page. If you are having higher than normal traffic, you are probably running out of server resources.
However, if you don't have larger access but still get a 503 error in WordPress, the problem may be due to a lack of server ram.
503 Service Unavailable error means that the WordPress site is up and running, but the server is inaccessible because of the current issue. Moreover, it will make both the front end and back end of the admin dashboard inaccessible. An example of a 503 error would display the following:
Depending on the server's configuration, this WordPress error will display slightly differently. For example, here are the error codes you might see:
- 503 Service Unavailable
- 503 Service Temporarily Unavailable
- HTTP/1.1 Service Unavailable
- HTTP Server Error 503
- 503 Error
- HTTP 503
- HTTP Error 503
There are many reasons for 503 error, from the plugin, theme errors to custom PHP script errors or problems with your current hosting plan.
Final Thoughts
503 Service Unavailable is a common error when you cannot access the website and website management page. It is usually caused by WordPress plugins, WordPress themes, and other problems.
Here is a summary of how to find the cause and fix the 503 error:
- Deactivate WordPress plugins, then enable them one by one
- Deactivate the current WordPress theme and switch to the default theme
- Enable WP_DEBUG . mode
- Identify and fix server problems
If you have tried all of the above but none of the solutions work, we may have missed a solution that works for you. Contact our Support team immediately to get help from the staff.
If you have ever encountered another 503 error, and you know how to fix it, please share it in the comments ;). And if you have any other questions, please leave a comment to discuss with us.