Is that pesky “503 Service Unavailable” error plaguing your website? This is one of the many common WordPress errors you will encounter while running a website. Unlike other errors, this one does not give the web developer any hints as to what is wrong and can actually be caused by quite a lot of things. This can make it very frustrating for WordPress beginners to solve.
Downtime is not a good thing to have on a website. It can ruin user experiences and drive away new visitors and if you have paid content, then you are not going to keep customers long.
Thankfully like many WordPress errors, it is not very hard to fix as long as you know what to look for. Today, I will demonstrate how to fix the 503 error in WordPress.
Why Does the 503 Service Unavailable Error Occur?
There are many reasons this error can occur. The first is heavy web traffic. Most web hosts have a fixed amount of resources allocated to each server. This can get even smaller when you are on a shared hosting plan.
It is also possible for it to be a glitch in the server, which is not something you can actually fix. Cyber-attacks have become quite common and most of the cyber attacks we see in today’s society are known as DDOS attacks. This type of attack will create an artificial amount of traffic that will overload your website’s server.
Now, if you were hoping that you could just blame your web host for this error, I’m sorry to inform you that this can also be caused by web developers. The error occurs when the webserver cannot get a response from a PHP script.
When you add new code snippets, plugins, and themes there is a possibility that it can stop this response from going through and odds are it’s one of these reasons why you are getting the error message.
Today, I will demonstrate how to fix the 503 error in WordPress. Unfortunately, if this is a server related error, there is nothing you can do on your end. But, make sure you contact your web host and make them aware of the issue.
Before you call your web host, though, you should make sure it is not on your end by following a few easy steps. You will need access to the cPanel, which is provided to you from your web host when you create an account with them.
I highly recommend creating a backup of your website before doing the following steps.
How to Resolve the 503 Service Unavailable Error
Step 1: Log In to cPanel and Access File Manager
Let’s start by logging into the cPanel and clicking on the File Manager option. The File Manager will allow you to access all of the files related to your website.
Step 2: Locate the Plugins Folder in WP-Content
You need to locate your plugins folder, which is located in the wp-content folder. Click on the public_html directory, then click on the wp-content folder. You should now see the plugins folder.
Right-click on the plugins folder and select the “Rename” option. Rename it plugins-old.
Step 3: Create a New Folder and Name it Plugins
Now you need to create a new folder and name it plugins. Make sure the folder name is spelled correctly or it will not work.
Visit your website to see if the issue has been resolved. If it has, then you need to find out which plugin is causing the issue. If it did not, then the problem is not a plugin.
In either case, delete the new plugins folder and rename the plugins-old file back to plugins.
All of your plugins will be restored, but they will all be inactive. You need to visit your website’s dashboard and activate all of the plugins. If you are looking for which plugin caused the error, activate each plugin one at a time and load your website to see if it has the error or not.
Note: If the plugin was the issue, then you are done and can skip the rest of the steps. If not, then it is time to see if the theme is the problem.
Step 4: Access the Themes Folder
Once again head back to the File Manager, but instead of the plugins folder, you need to go inside of the themes folder.
Once inside the folder, you will see a list of every theme you have installed.
Step 5: Create a Test Folder
Create a new folder called test in the public_html directory. Find the theme you currently have activated and right-click it. Select the Copy option. Make the copy: path: /public_html/wp-content/themes/test.
Right-click the themes folder and select Delete. This will disable your current theme and the default WordPress theme will become active. Check your website and see if the error is resolved. If it is, then it is because of your theme or a code snippet that you inserted into it.
If this did not resolve your issue, simply go into the test folder and copy the file back into the themes folder and delete the test folder.
Step 6: Contact Web Host (If Needed)
Hopefully, you found the cause of your 503 error and have been able to resolve it, but if you did not, then it is most likely a server-side problem or high traffic and you need to contact your web host to find out what is going and how quickly your website is expected to be online.
If you don’t get the response you are looking for, then it may be time to switch web hosts. If at any point after you have gone through any step you still can’t seem to get your website back to the way it was, then use the backup to restore your website.
Millions of websites will deal with some form of an error message and it’s nothing to panic about, but a calm and fast response will stop an extended downtime period from occurring. If all else fails you will need to use a backup to get a working version of your website before the error occurred. Backups are one of the best ways to avoid downtime or loss of data on your website and should really be one of the first things you set up on your website.
As long as you stay calm and respond fast, error messages should not affect your website too harshly, but you need to make sure that if the mistake is due to something you did, you take measures to avoid it from happening again.
Dealing with a 503 error can be frustrating, even more so if you have no idea where to start when it comes to diagnosing and fixing the issue. There are several things you can do in order to fix the error.
If all of the above fails, then go ahead and contact your web host and have them walk you through the fix. They should either be able to show you exactly what happened or just fix it for you
Was the error message on the server-side or on your side? Was it because of a theme, plugin, or code snippet?
Author: Chris Racicot
Chris is the Support Manager at GreenGeeks and has been with the company since 2010. He has a passion for gaming, scripting and WordPress. When he’s not enjoying his sleep, he’s working on his guitar skills and fiddling with 3d printing.