Are you facing the 503 service unavailable error in your WordPress site? It is among the most frustrating errors you will come across in WordPress.
This error confuses most of the WordPress users,especially beginners. Apart from making your website go offline,it does not show any clear cause of the error.
However,there are many causes of the “503 Service Unavailable” error,which comes in various error codes.
In this article,you’ll learn how to fix this error,as well as its causes in WordPress. If you need further assistance click the following link: Visit Helpbot
What Is The Reason For A 503 Service Unavailable Error In WordPress?
Often,this error occurs due to outdated themes and plugins that are malfunctioning. This problem happens if your site server has difficulty receiving a response from any PHP script. In most of the cases,the cause of this is either outdated themes and plugins or poor coding scripts.
Nonetheless,higher usage of server resources can cause this error. Every hosting account has specific amount of resources from hosting providers. Websites using shared hosting cannot withstand heavy usage because of this limit.
In other cases,this error occurs due to server downtime and denial of service attacks (DDoS). This error may disappear automatically within some minutes if the cause is a DDoS attack,server glitch,and high resource usage.
On the contrary,it will keep appearing if your website has a bad code. In order to fix this,you need to locate and deactivate this code.
How To Fix A 503 Service Unavailable Error In WordPress
Here are the best methods to use for fixing this error:
1. Manually deactivate all your WordPress plugins
To determine if a plugin was the cause of this error,you should deactivate all your plugins. However,since your WordPress dashboard is inaccessible,you need to do so from the server. You can either use a File Manager in cPanel or an FTP client such as FileZilla.
In this case,we shall use the cPanel File Manager because access is open to everyone. Here is how to do so:
- – Login to your cPanel File Manager.
- – Find the WordPress root folder that is named public_html.
- – Click open that folder and go to the WP-content directory.
- – Look at the plugins folder and then right-click on it. Next,select the Rename option.
- – Create a new folder and rename it. For example,old-plugins or deactivated plugins.
- – Now,check if the error is gone by visiting your website.
If the error is gone,that means one of your plugins was the cause of the error. However,you deactivated all your plugins using the above step
To locate the plugin causing this error,you need to go back to your cPanel File Manager or FTP client. After that,go to WP-content>>folder>> delete the plugins folder that is empty.
Next,rename your named folder (deactivated plugins or old-plugins) to plugins. This makes WordPress to detect all your installed plugins. Nonetheless,the plugins remain deactivated.
Then,you need to go to your WordPress dashboard>> Plugins>> and then reactivate one plugin at a time.
After every activation,visit various pages of your site to see if it is running well. Repeat the process until you locate the plugin that is causing this error. Delete the error causing plugin.
At this point,you can either get an alternative plugin in the WordPress Plugin Directory or ask the developer for solutions.
2. Switch back to your default WordPress theme
If the deactivation of plugins did not fix this 503 error,you need to deactivate your current WordPress theme and use a default theme.
To do so,you need to use cPanel or FTP clients to access your WordPress website. Once you log in,go to WP-content/themes/ folder.
Find your present active WP theme,and then download it like a backup in your computer. After that,delete it from your site. As a result,your default theme is activated automatically. However,if you have not installed a default theme,go ahead and install one.
Now,visit your website to ensure the 503 services unavailable error is fixed.
You can either contact your theme support for a solution or find an alternative theme to replace your error-causing theme.
3. Trace the source of the error by enabling the WordPress debug feature
The above solutions fix errors from themes,plugins,and the server. Therefore,this error fixes errors from custom scripts.
Most WordPress users do not track their custom code additions,as WordPress has many files. Thus,locating the appropriate file and tracing the exact error-causing lines is not easy.
Nonetheless,the WordPress debugging feature helps you in tracing the error source. By default,this feature is off,and you need to activate/enable it for use.
To do so,open your cPanel in File Manager or FTP client.
Next,go to WP root folder>>wp-config.php file>> right-click on it and select view/edit choice. This opens the config.php file using a text editor.
At the bottom of the file,find the line stating,”That’s all,stop editing! Happy blogging.” Enter this code above that line and save your changes.
Next,visit your website to trigger the 503 error. Remember,the wp-config.php file instructs WordPress to display the error. The message shows even the error-causing file. Make the necessary changes to fix the error.
How To Avoid Server-Based 503 Errors In WordPress
– Upgrade to an ideal hosting plan
Your WP website will have fewer problems to handle higher traffic if your hosting plan is robust. Whenever your site outgrows your present hosting plan,you notice it slows down. Therefore,you need to upgrade to a better idea. It should be the one that offers many features,and can handle any website.
– Utilize a content delivery network(CDN)
CDNs are groups of servers,which make copies of your site pages,and then serve them when needed. CDNS are intermediaries of your site and visitors. One of the major benefits of CDNs is releasing your servers from the excess load. Also,they protect your website from any DDoS attack and traffic increase. For example,CloudFlare is a good CDN with a free plan and many advantages.
If the above solutions fail to fix this error,try to re-install your WordPress. This results in fresh copies of code files. On the other hand,you can contact your hosting provider to find the cause of the error and its solution.
If you have any comments,suggestions or questions about how to fix a 503-service unavailable error,click the link below.