Well, if you are a beginner and working on a WordPress site, it is quite possible that you will face some errors. The 503 Service Temporarily Unavailable Error in WordPress is one of them. This is generally caused by outdated and malfunctioning plugins and themes.
If you are getting trouble with HTTP 503 service unavailable error than follow the below steps to debug it and fix the problem.
Furthermore, it has numerous potential causes. To fix this – you will have to recognize the root cause of the same problem.
What is 503 service temporarily unavailable error in WordPress
This error is not alone seen in WordPress. It is also a universal message that occurs while you are trying to access a site but the server cannot be reached. This means to say, your WordPress site has reached the limit of the number of requests.
Basically, a few browsers show this – 503 services temporarily unavailable error message to tell you to try again later. How this might look like:
Causes of HTTP error 503 Service – The Service Is Unavailable
- This error occurs when your web server is not able to get a proper response from the PHP script. This PHP script can be a WordPress plugin, theme, or a custom code snippet with incorrect behavior.
As where plugin is defined as a type of software that contains a group of functions that can be added to a WordPress website. They are used to provide additional functionality to your application.
A theme is a group of stylesheets and templates that are used to describe the appearance and display of a WordPress site. A WordPress theme changes the layout & design of your site. And templates are those files which control how your WordPress site will be displayed on the Web.
If the error is caused by heavy usage, a DDoS attack, a server glitch, then it may disappear automatically in a few minutes. As DDoS attack stands for Distributed Denial of Service. It is a common type of attack against your server bandwidth.
However, if this happens due to bad code on your site, then it will remain until you find and disable the code that is causing it.
Thus, this is what we are elaborating here. Keep reading….
Fix 503 Service Temporarily Unavailable Error In WordPress
We mentioned above that this 503 service temporarily unavailable error is caused when your web server is not able to get a proper response from the PHP script running in the background.
Web server is a software which receives your request for accessing a web page. It runs only a couple of security checks on your HTTP request and takes you to the web page.
To fix this, we will disable all unnecessary PHP scripts one by one until the error is solved.
Deactivate All WordPress Plugins
- Note that all your WordPress plugins are PHP scripts. Therefore, you have to disable all the WordPress Plugins.
- Since you cannot log in to your WordPress Dashboard because of a 503 Service error. You need to connect to your website by using an FTP client or file manager in cPanel.
- Where, FTP or file transfer protocol is used to transfer files from one local computer to a remote website, such as a WordPress blog and FTP client is a software that helps users to transfer your files from your web server.
- cPanel is also known as control panel which is basically a web hosting panel based on Linux system and provided by many hosting providers. It provides a website all the automation tools to simplify the process of hosting a website. It also provides a graphical user interface to the website.
- After connected, then go to .the /wp-content/ folder and rename the plugins folder to plugins-old
- Next, you have to create a new folder and name it plugins. Here, you need to go to your WordPress site to see if it resolved this error.
- If this happened, then this means that a plugin installed on your website was causing an error. The above steps have disabled all WordPress plugins.
- To find out which plugin was causing the problem, you have to switch back to your FTP client or file manager in cPanel. Thereafter, you have to delete the empty plugins folder by going to the /wp-content/ folder.
- Now, you have to rename the plugins-old folder to plugins. It will make all your already installed plugins available for WordPress. However, these plugins will be disabled.
- You have to go to the WordPress Admin Area and then go to the plugin page. You can activate your plugins one by one, and after activating each plugin, you can visit different pages of your website. Keep doing that unless you search the plugin causing the 503 Service error.
If this step resolves your problem, you do not need to follow the rest of the instructions on this page. Otherwise, you can go to the next step.
Switch To A Default WordPress Theme
If the deactivating plugins have not resolved the problem, then the next step is to switch to the default WordPress theme. This will deactivate your current WordPress theme.
- The very first, you have to connect to your WordPress website by using an FTP client or file manager in cPanel. Once connected, then go to /wp-content/themes/ folder.
- Find your currently active WordPress theme and download it on your computer as a backup. After downloading the theme, you can go ahead and delete it from your site.
- Now, if you already have a default theme such as Twenty Seventeen or Twenty sixteen installed, it will be automatically activated.
- If you don’t do this, you can go ahead and install the default theme on your site. To ensure this, check your website completely that the 503 Service unavailable error is resolved.
Custom PHP Code
Adding the 3rd party code by external service or code snippets to your WordPress site can cause of this 503 Service error. But the problem is – how do you identify that the problem is code.
Often, this error locks you out from your WordPress admin area, so we will use WP_DEBUG and WP_DEBUG_LOG, WP_DEBUG_DISPLAY and @ini_set constants available to WordPress.
Here admin area is also known as the administration area in WordPress website where only an authenticated user can make changes. It allows you to create and manage posts, pages, menus, media, change styling in the form of themes, add functionality in the form of plugins, and much more.
As the articles posted by the admin of a WordPress site are called posts and pages are like posts. Pages can be managed in a hierarchical structure in WordPress.
Follow the below steps to enable the debug mode in WordPress and write error to a log file.
- The very first thing, you have to open your WordPress directory through FTP or File Manager.
- Thereafter, open the wp-config.php file.
- Now scroll down to where the WP_DEBUG is defined. It looks like this define (‘WP_DEBUG’, false);. If this is missing, you have to add it just above the line that says /*That’s all, stop editing! Happy blogging.*/
- Here you need to insert the DEBUG magic codes. Just change the above define (‘WP_DEBUG’, false); code to:
define (‘WP_DEBUG’, true);
define (‘WP_DEBUG_LOG’, true);
define (‘WP_DEBUG_DISPLAY’, false);
@ini_set (‘display_errors’, 0);
- Now click on the Save Changes button.
Now reload your WordPress site to trigger the 503 Service error. Thereafter, search the debug.log in wp-content in your WordPress directory.
More so, this file includes all the errors on your WordPress site. In case the error is caused by this custom code snippet, it will display you somewhere with entire details.
Lastly, replace the code and reload the site, if the error is insist, the problem could lie in your web server.
If all the methods fail to resolve this error, then you can follow these steps:
- Contact your WordPress hosting company or contact to WordPress Help team because they can instantly pinpoint the issue.
- As a last resort, you can install again WordPress with a fresh copy.
I hope this guide will help you to fix 503 Service Temporarily Unavailable Error in WordPress. Still, if you need any help related to WordPress you can contact our WordPress Technical Support team. Dial +1-855-945-3219 (Toll-Free). We will be pleased to support you in case of any issues.