Well, if you are beginners 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 – 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.
- If the error is caused by heavy usage, a DDoS attack, a server glitch, then it may disappear automatically in a few minutes.
- 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.
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 error. You need to connect to your website by using an FTP client or file manager in cPanel. 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 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 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.
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 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.