Fix 503 Service Unavailable Error (WordPress Tips Included)

fix 503 service unavailable error

503 Service Unavailable Error is always sucking either when it appears with WordPress site or other ones. In this article, we includes detailed information about the issue, and how one can easily fix HTTP 503 error.

Introduction to 503 Service Unavailable (HTTP 503)

While surfing over the web, the browser use to send request to server, in against of which the server sends back requested data and response code. The HTTP response code returned by the server actually informs the client that their request has been successful or not. Mostly, these response codes are classified in 5 different classes, and the ones ranges between 500 to 599 indicates to a server error.

The eruption of HTTP status code 503 when returned on screen, it indicates to a generic error that means the server can’t handle the request. Or say, the error code will be displayed on screen when the server is overloaded with requests or down for maintenance. So, in case if you end up to see 503 service unavailable error code on screen, you can do nothing much as it’s not related to browser or internet connection. Still you can try some best practices included here:

  • Reload browser or try opening the page with other browser, although there’s minimum chances that the page will load successfully.
  • Clear your browser cache, this actually clears the cache for error displayed on browser and requests a new version of the page from server.
  • Check visiting the site later.
  • Contact the website administrators regarding the issue and they will fix them.

503 Service Unavailable Error in WordPress

While speaking about WordPress based sites, actually most of the hosting providers offer a limited amount of resources to each hosting account (shared account). In such instances, there’s limited service resources available and can’t handle heavy requests from a large traffic.

Means, if the HTTP 503 error occurs with WordPress, means the web server is unable to get response from PHP script properly. The script in WordPress mostly refers to WordPress plugin, theme, or some custom code snippet.

However, in case if the error is occurring due to some internal server glitches, DDoS (Distributed Denial of Service) attack, or heavy traffic, the error automatically goes off after some time. Even sometimes, the bad code present on website can also be responsible.

What are the reasons to see HTTP 503 (Service Unavailable)?

Based on the information we discussed earlier in this post, there can be various possible reasons which can cause 503 Internal Server Error. And some of the common reasons can be:

  • DDoS Attack: It’s actually a malicious attempt by hackers to floof the bandwidth or resources of your server and overload it. Once the server is overloaded, it will not serve browser requests properly.
  • Server Maintenance Downtime: Hosting providers often some some changes, updates, and modifications on their servers, and in such cases the server keeps itself busy doing other tasks. So it remains unavailable to serve website’s requests.
  • Firewall Settings: A reconfigured firewall setting can also be responsible to see 503 HTTP error. If the site is connected through a CDN, it determines the request as an attack and block them automatically, and results to 503 error.
  • Hacked Site: When a site gets hacked, the criminals often inject some malicious code, which results to show the error.
  • Plugins and Themes (WordPress): If your site is powered by WordPress, or similar CMS (Content Management System), the eruption of 503 error can be due to some issues with your theme or plugins.

How to fix 503 Service Unavailable Error?

If you are a web administrator and your site is running with HTTP 503 error, then you might need to sort out the issue soon. The proper way to fix the issue requires you to determine the possible reason first causing the error. The best method is to check your server logs. On a Linux based web servers, here includes the location of logs on Nginx or Apache:

/var/log/apache2/error.log
/var/log/httpd/error_log
/var/log/nginx/error_log

However, in case if your site is running on WordPress, you need to disable all unnecessary PHP scripts one by one to check if the HTTP 503 error is resolved. In order to do so, you should disable all WP plugins or switch to a default theme.

Deactivating All Plugins

Since your server is unable to handle the request and showing 503 error, you can’t connect to WordPress dashboard, so you should try connecting to your website’s files using FTP client or File Manager through hosting cPanel. Once connected, navigate to wp-content directory and rename the plugins folder to plugins_old or anything else.

rename plugins directory

Once done, browse your WordPress site on browser to check if the error is solved. In case if the error goes, this indicates the 503 service unavailable error is due to some faulty plugins. You can find the faulty ones, by deleting plugins folder (this get automatically created when the site reloads after renaming original plugins directory), and rename plugins_old, back to plugins.

delete plugins directory

After the original plugins directory is back in action, the installed plugins still remains deactivated. So just visit the WordPress admin area, and activate the plugins one by one, and keep refreshing the WordPress site after each activation. This will easily help to determine the faulty plugin. You can contact the faulty plugin’s developers to solve the issues.

However, in case if deactivating all plugins won’t work to resolve HTTP 503 error, try out the next method.

Switch to default WP theme

Since the above method failed to resolve 503 service unavailable, we suggest you to change your WP theme to default theme, and doing this will deactivate your currently active theme.

In order to do so, connect your WP site via FTP client or in cPanel and navigate to wp-content/themes/ directory.

download active theme on system

Once in, find the active theme’s directory and download it on your computer to make a backup of it. After the download completes, delete the theme’s directory. Deleting the active theme will force the WordPress to start with default themes such as Twenty Twentyone. Do make sure the default’s theme directory is installed on WordPress. If not, you can download a default theme from WordPress official page, upload the .zip file through FTP and extract the file in theme’s directory under wp-content.

After you have installed the theme on your site, you can visit the homepage through your browser to check if 503 service unavailable error is solved.

Additional recommendations if the issue persists

In case if the HTTP 503 error is still not resolved, then the issue might not be due to theme or plugins. You should now try to reinstall WordPress fresh copy. Also, you should contact your hosting provider’s technical support team to seek their help, and they might be able to identify and detect the problem with the help of which you can fix 503 service unavailable issue.

Final Thoughts

503 service unavailable or HTTP 503 or 503 Internal Server error, are expected to occur with any of website, even with a WordPress site, if something goes wrong with its script or server side issues. In order to fix it, we have discussed a number of methods above. We hope you might be easily able to fix the issue in your case. Let’s check out more common WordPress errors and how to fix them.