Port to the world of technology

How to fix the 503 service unavailable error in WordPress

0

This article brings you simple four troubleshooting tips to fix the error of 503 services unavailable and two ways to avoid it happening again. The article will be important to all new users of WordPress. The error of 503 services unavailable has many potential reasons to occur. But if you perform troubleshooting tips methodologically, you can fix this error in WordPress finely. Also, you will be able to avoid this error happening again.

The error 503 service unavailable and reasons to occur

Normally the error 503 service unavailable is a usual error message which arises due to the inability of the server to reach a particular website. Hence, this is not a special message that arises only on WordPress. This message depicts you that it cannot get access to a particular website currently or try to get access again later to a particular website.

In such a situation, it can shows four common reasons basically for the occurrence of this error of 503 services unavailable.

 

error 503 service unavailable
error 503 services unavailable

The 503 service unavailable error is not unique to WordPress. It is a universal message that you are trying to access a website but cannot reach its server. In contrast to a 404 error (which arises when you try to access a page that does not exist), the 503 error lets you know that something is up, but it is currently inaccessible. In fact, some browsers will show you a message that the 503 service is not available temporarily and will basically tell you to try again later.

  1. A problem with the theme or plugins.

In WordPress, the most common issues are PHP scripts. One of the themes or plugins will unable to load as the server’s request.

  1. Custom scripts.

Some users add custom scripts to WordPress and this may also cause the error 503 as explained above.

  1. Server downtime

The server will be a temporary block due to excess traffic and enable access to the website. As many new web hosts have incredibly low downtime.

  1. Denial of service (DDoS) attacks

This will happen due to a DDoS attack which involves directing a large amount of traffic.

How to fix the error 503 service unavailable in WordPress

First of all, you should make sure that you have a backup of the site regularly before perform any troubleshooting tips. However, this error cannot be solved easily through a recent backup like other errors in WordPress.

  1. Disable the WordPress plugins

If you use multiple plugins simultaneously, it will increase the odds of an incompatibility.  Hence you cannot access the dashboard as usual and disable plugins. Then you have to download and install an FLP client like FileZilla. The FLP client helps you to transfer files with the server securely. Then you have to perform below steps finely to get it done.

  • Select Settings and then go for the General section in the 000webhost.
  • Look up the FLP access credentials.
  • Log in to the server from within FileZilla.
Website Settings
Website Settings
  • Locate the WordPress root folder. (This file is named as public_html usually and you can see all own folders of you on the right-hand side in the server)
  • Open the folder and navigate to the wp-content directory.
  • Click on the plugins folder and select the Rename option.
Rename Folder
Rename Folder

 

  • Rename the plugins folder such as plugins- deactivated or some other name which you can remember easily.
  • Try to access the WordPress website.
    • If a plugin is behind the 503 error, you can access the WordPress finely. However, it requires to deactivate all plugins. For that, you have to go wp-content folder again. You can use an FLP client for this. Then you have to rename the plugins-deactivated name to its original name. Then WordPress will identify your old plugins. But note that those plugins are deactivated by default.

 

  • Access to the WordPress dashboard and select the Plugins tab.
  • Reactivate all plugins one by one.
  • Check whether error 503 messages appear after activating each plugin.
  • If the error appears, go to the wp-content/plugins directory through the FTP client and delete its corresponding folder.
Delete error occuring folder
Delete error occuring folder

 

  • It will avoid the error happening again. However, you have to ask the developer to fix the plugin or search for a replacement in the WordPress plugin directory.
  1. Disable the active WordPress theme

In this step, you have to disable an active theme using an FTP client and check whether the issue is with the theme. For that, you can do follow things finely.

  • Access to the server using an FTP client.
  • Locate and access the WordPress root folder.
  • Go into the wp-content/themes directory.
  • Search the folder which similar to the active theme.
  • Right-click on the theme’s folder and select the rename option.
  • Change the theme name to mytheme-deactivated.
  • Go to the WordPress website. If you can access the WordPress website and error message is not appear now, it means that the reason is the theme.

 

Disable the active WordPress theme
Disable the active WordPress theme

However, it replaces the default theme after deleting the theme folder. So you will require to get the old theme back. Then you can re-download the theme from the provider and it should be the latest version. If you do it, the error message will not appear again.

  1. Enable WordPress’ debug feature to track the source of the 503 error.

Sometimes the issue may be with the custom scripts. But the problem is that many users lose custom code additions. It is more difficult to find out the right code due to so many files in WordPress. For that, it has the debugging feature in WordPress. However, the debugging feature is disabled by default. So you have to enable it and below steps need to perform to do it.

  • Access to the WordPress root folder.
  • Search the wp-config.php file.
  • Right-click on the file and select the view/edit option.
  • Find out the line that says “That’s all, stop editing! Happy blogger” near the end of the file.
  • Type below line above it.
    • @ini_set(‘display_errors’,1);
  • Save changes and close the file.
  • Go to the WordPress website and it will be showing a detailed error message which is not similar to the 503 error message as shown below.

This detailed error message brings you information about the file causing the error and the specific line of code need to execute. Then you have to find out the particular file using FTP client and make necessary changes.

  1. Contact the web hosting provider

In a situation where the WordPress website receives a massive influx of traffic even it genuine or malicious, you have to obtain the support from the web host provider. Because you are not able to resolve the issue by yourself in such a situation. The first question you should ask from the hosting provider is whether there is a massive influx of traffic on the WordPress website. Then your web host provider will do below things.

  • If it is possible, they will upgrade your plan to deal with the spike in traffic temporarily.
  • They will ask you to move to a better plan which able to manage the traffic.
  • If the problem has arisen due to a DDoS attack, they will take defensive action against it.
  • They will ask you to wait until the traffic wave dies down.

How to avoid future 503 server-based errors in WordPress

You can do two things to avoid error 503 in the future. This is a proactive task you can do to resolve the problem permanently. Hence, this will be more important for all users to know.

  1. Upgrade to a better hosting plan

If the hosting plan is more powerful, you will get less amount of issues. Your WordPress website may be expanded to your current hosting plan. In such a situation, you can have experience on slow down the website all the time. It provides an indication of the current hosting plan. Definitely you have to upgrade your current hosting plan. Then you will not face this kind of error in the future.

  1. Use a content delivery network (CDN)

A content delivery network is a group of servers. Those are can make copies of the web pages. If the user requires them again, CDN can provide them back. Obviously CDN reduces the load on the server and they are very fast and widely available in the world. The most important point is that CDN can safeguard the WordPress website if it occurred a DDoS attack or a traffic spike.

However, it cannot assure that you will not get any further error messages after incorporating a CDN into WordPress. As well as it has no drawbacks to adding a CDN into WordPress in most situations. Further, you can refer the guide on integrating Cloudflare with WordPress.

Conclusion

The users will feel unhappy when they get the 503 services for WordPress. But this issue can solve easily if the user can work methodologically and prevent it to happen again in the future.

This a small recap on the four steps you should follow to fix the error 503 services unavailable. First of all, you need to remember that you require the service of an FTP client. So if you still have not to download an FLP client, do it first and then do steps one by one.

  1. Disable the WordPress plugins.
  2. Disable active WordPress theme.
  3. Enable WordPress error display feature to detect the source of the error.
  4. Contact the web hosting provider.

Connect with us

We would like to hear about your problems, questions, and suggestions. So feel free to contact us. This is free of charge service that we offer. But we receive thousands of emails per day. So it is impossible to reply to all of them. So we create a Community to help you individually. Go to Community and open help Topic under the relevant category.  Please spread this post to your friends by sharing Facebook and other major social media. And make sure to like us on Facebook.

 

Leave A Reply