Saw the “503 Service Unavailable“ message in place of website content? Don’t worry, it might not be permanent. But if a minute or two passes, and the message persists, you shouldn’t hesitate further. Hoping it goes away on its own can cost you visitors, and even search results ranking. To put it simply, the issue arises from your web server’s inability to load a PHP script, and thus your website homepage. The unfortunate thing is that the issue can come from an improperly closed bracket or even a comma. Regardless, we’ll try our best to show you how to fix 503 Service Unavailable error in WordPress.
Common reasons for 503 Service Unavailable error in WordPress
Here are some of the reasons 503 Service Unavailable error in WordPress appears:
- Heavy usage of server resources on shared hosting, or surpassing the account limit.
- Webserver glitch that affects your share of the server.
- DDoS attack on the webserver or your website directly.
- A delay after leaving Maintenance Mode in WordPress.
- Error in syntax or code on one of the WordPress files such as code snippets.
- Misbehaving plugin or theme.
- Problems with CDN that affect resource delivery.
1. Fix 503 Service Unavailable error in WordPress by disabling WordPress plugins
The most time-efficient way is to start with the most recent WordPress plugin you installed. If you can’t access the WordPress Admin Section, you’ll have to do it by accessing your WordPress website via FTP. We described the process in detail in our “Are you sure you want to do this” error fix guide. Follow the steps under the headline titled Fixing the problem if the plugin caused it.
2. Deactivate the active WordPress theme
If it isn’t a plugin, it might be the currently active WordPress theme. The reason could be an incomplete update, a bug in the newest update, or a human error on your part while customizing the theme. To check, go back to the aforementioned guide, and follow the instructions under the headline Fixing the issue if a theme was the problem. If works, you’ll have to either:
- Revert the most recent changes you made to it
- Install another WordPress theme.
3. Disable your CDN (Content Delivery Network)
If made no alterations to your WordPress website lately, and you have no idea how to solve 503 Service Unavailable error in WordPress, let us ask you this. Are you using a CDN service to speed up your website? If so, it may be the culprit. To check, you’ll have to disable it temporarily. Remember, you already disabled WordPress addons, including those tied to a CDN such as WP Rocket’s RocketCDN. So, based on the CND in question, you’ll have to do one of these:
- Log in to your user account on the CDN’s website, and find a way to pause the service.
- Look through the Knowledge Base on your CDN’s website for help.
- Sign in to the cPanel on your hosting website, and look through the options.
- Contact CDN’s Customer Support, or your hosting customer support.
4. Deactivate WordPress Heartbeat API
Heartbeat API integrated into WordPress is responsible for notifying you when someone is writing a post, performs auto-saving of content you’re writing, and much more. For that reason, it has to activate at a high frequency to detect events and push updates as they happen. So, if you chose a cheap hosting plan or your hosting is facing performance issues, this API can overload the server limits, and lead to 503 Service Unavailable error in WordPress. To verify WordPress Heartbeat API is the reasons, you can disable it temporarily like this:
- Reconnect to your website via FTP.
- Go to root/wp-content/themes, and right-click on the functions.php file.
- Select View/Edit.
- When the file opens in a text editor, add this code snippet at the end:
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}
- Save changes and check the status of your website.
Heartbeat API is the source of the problem. What do I do?
Well, one solution is to keep it disabled. However, you’d lose a lot of functionality it brings. Instead, we suggest you limit how often it activates. The easiest way to do so is to install a plugin in WordPress via FTP. We suggest using Heartbeat Control by WP Rocket. Or, if you’re using the SiteGround Optimizer plugin, utilize its built-in Heartbeat control functionality.
5. Limit Googlebot crawl rate
If your server resources are at an end, Google bots that crawl your website for changes too often can take it over the edge. Consequently, your website crashes and produces the 503 Service Unavailable WordPress error, also displayed as HTTP Error 503 or HTTP 503 sometimes. So, you’ll need to log in to the Google Search Console. Then, visit its Crawl Rate Settings page. If you see the crawl setting listed as “calculated as optimal“, you’ll have to file a special Googlebot request. Once enabled, it takes 2 to 3 days for the bots to adapt. Also, the crawl rate reduction is valid for 90 days, then restored to the original value.
6. Fix 503 Service Unavailable error in WordPress by enabling WordPress Debug
If nothing you tried worked, you can utilize WordPress’s Debug feature that can pinpoint the code lines that are potential causes. With a little patience and a knowledge of PHP, you can get to the bottom of the problem. Alternatively, you can contact your hosting Customer Support for help. With that said, check our “This site is experiencing technical difficulties“ error fix guide for detailed steps required. To be more specific, read the instructions in the headline titled How to use WordPress Debug Mode.
7. Increase server resources
If methods 4 and 5 solved the issue or at least improved website performance, it’s clear you need to either:
- Upgrade your payment plan to a more expensive one.
- Move your website to high-quality hosting. Check our Hosting Reviews page to help you make the decision.