503 error is a common error seen in WordPress. If you are using WordPress for a while, you might have come across this error. We will see the complete procedure on how you can fix the 503 services unavailable error in WordPress.
There are many ways to fix it, we will see all of them one by one.
Overview of Error 503
As the name implies, the service unavailable error in WordPress is when the server or the script is not available. It may be the server that is giving the problem or it might also be the service or the script that is causing the error. Therefore, it becomes harder to know what is causing the problem exactly.
Talking about how the error is shown, there are various possible ways. You will see the error in one of the following ways. In most cases, you will first see the error. However, if you see it in any other way, it will be the same error, which means the solution is also the same.
- 503 Service Unavailable
- Http/1.1 Service Unavailable
- HTTP Error 503
- HTTP Server Error 503
- HTTP 503
- 503 Error
So, these are some of the possible error types. Now, we will see how you can fix the error in your WordPress.
There aren’t many things you can do here. However, the things you will do will surely solve the error. So, there is nothing to worry about. You can just follow the guide and your error will be gone in no time.
Fix 503 Service Unavailable Error in WordPress
Here are some of the ways on how to fix the 503 error.
Rollback the Changes
The first thing you can do is to roll back the changes. If you recently added any code to your WordPress website, that might be the reason for the failure. So, you need to roll back the changes and make sure that the website is running as it was.
You can simply remove the added code on your website. In the same way, if you have recently activated any plugin on your website or you have added a new plugin, you need to remove that plugin. Of course, you can just deactivate it instead of deleting it. This will do the work.
To deactivate it, you can simply change the name of the plugin. Once you change the name of the plugin from the file manager, you are halfway there. Your job will be done and the plugin will be deactivated. Thereafter, you just need to keep in mind other things.
By other things, we mean themes and the PHP code that you added. You can switch back to the default theme and then try to use the website again. If not, you can simply go to the next step.
Deactivate all the Plugins
The next step is to deactivate the entire plugin set and try again. Sometimes, you can’t decide which of the plugin is giving the issue. So, your job is to deactivate all the plugins and see if the website is working again or not.
This might seem like a hard task but it is surely not. It is super easy to deactivate all the plugins with just one click. All you need to do is head over to the file manager and then change the name of the plugin folder.
Once you change the name of the plugin folder, you are done. You don’t need to do anything else. Thereafter, you can reload the website to see if it is working.
If everything is back to normal, you can again change the name of the plugin back to the original one. This will ensure that the plugins are back to normal.
But what if the website was working fine when you deactivated them and when you activated them again, the website stopped working?
In such a case, you will have to do the troubleshooting by yourself. To do that, you will have to activate some plugins and then see the website. Continue the same procedure until you find the real plugin that is causing the issue.
Thereafter, you can delete that plugin and restore that website.
In most cases, it is the cache plugin or the security plugin that is causing the issue. So, if you have any of these plugins installed on your WordPress website. It is highly recommended to deactivate them and see if the website is running again or not. This will save your time and efforts.
It could be a configuration mistake also. So, you can try changing the options instead of deactivating them.
Resource Limit and Ports
In some cases, the resource limit in your hosting might be exhausted. This happens in shared hosting where the limit is exhausted.
By default, the hosting provider allows you to use a certain limit on your website. In simpler words, you can only use 25% of the resource. This resource includes CPU usage, RAM, etc. If you exhaust the limit, the hosting provider might also pause your website.
In some cases, you will see that the website is no longer available. That is you will see the service unavailable error. So, it is always a better idea to check it.
You can simply check it by heading over to the cPanel. All the data is shown there. You can take the steps after seeing the data.
Along with this, make sure all the ports on your website are open. To check it, you will have to head over to the Ports option in your cPanel. Just make sure that the ports are shown there are open.
If it isn’t open, the hosting will also show you the reason for blocking it. For example, if there is a virus in your script, it might have blocked the port. So, you can check the port and see the website again.
In most cases, you will get the email if something has gone wrong. However, it is always a better idea to check the cPanel or you can also check other websites hosted on the same server to be sure about the issue.
There is a slight chance that the DNS propagation is giving the issue. If you recently made some changes to your DNS, you need to make sure that the DNS is working properly. Normally, it takes roughly 2 to 48 hours for DNS to propagate.
Therefore, you can simply wait till the DNS propagation is done for you. Also, if you recently added anything to the DNS, you need to check it twice to be sure.
Unless you have changed it recently, there won’t be an issue here. So, you can simply continue to the next one.
If you are using a CND (Content Delivery Network), you need to pay proper attention there. Sometimes, the reason for the error “Service unavailable” is because of the CDN.
So, you can open the CDN’s website to see if the error is caused by them or not. Further, you can also try to deactivate the website and see if the error is gone or not.
If you are using CDN for a while, you will automatically know what a CDN error looks like. So, if it is not the server’s error and it is the CDN’s error, you can remove the CDN for a while and see if it is working again or not. You can surely reactivate it again if it doesn’t work. CDN is important and you should surely have it.
Contact the Hosting
Lastly, if nothing works, you can surely contact the hosting provider. Just contacting their live chat support will tell you a lot about what you need to do. The live chat support will tell you if something is wrong from their side or if something is wrong from your side. They will also tell you the exact reason for the error. So, you can solve the error thereafter.
If you don’t want to contact the hosting provider, you can also check out the logs on the server. Every server consists of a log file where all the things are stored. You can simply check out the log file and take the steps accordingly. It will tell you where the error is. Further, it will also tell you which line the error is there.
Therefore, it will make your work a lot easier than it seems. You can then take the steps to fix it.
If you can’t understand anything there in the log file, you can simply contact support. Contacting support will be the best option in such a case. They will tell you directly and in most cases, they will solve the issue.
To conclude, these are some of the best ways to fix the 503 service unavailable error in WordPress. You can try all the things one by one and see which one works for you. The steps are simple and some of these are common for all the errors. So, you can surely try all of them one by one and if you see some other error in the future, you can still try the same steps.