A 503 Service Unavailable Error is one of those issues that is bound to happen at some point. A perfect example to this was earlier today when I made some adjustments to this site, yes my main site, and I started getting the dreaded 503 error message. The problem I had was that it wasn’t the entire site, but a small piece of it. These are some of the worst errors as a lot of times we have no idea what is causing them or where to look to fix them. So I wanted to write a 19 step process that I use when trying to fix a 503 Service Unavailable Error.
My Entire WordPress Site is Down!
1. Is it down for everyone or just me?
Sometimes the issue is just with you or your location, so I like to start with a handy little website that will tell me if my site is truly down.
Start there and lets make sure that your site really is down and it isn’t just your connection. If it is just you, restart your computer, that is one of the fastest fixes typically. If it is down for everyone, keep going on the list.
[box type=”info”]Is your WordPress Website Secure?
WordPress Security Basics: Securing Your Website with A Free Plugin
25 Steps to Having & Keeping A Hacker Free Website
Download this Free Ebook Now To Secure Your Website: [wd_hustle id=securing-wordpress-exit-intent type=popup]Click here[/wd_hustle]
2 Million Plugin Installs & Counting, All These Users Can’t Be Wrong[/box]
2. Stop Hitting Refresh Over and Over and Over
One of the leading causes for a server to get overloaded is when you try to go to a website that is already struggling (lack of server resources) and you start hitting “refresh” like a whack a mole game. Lets say that you and 500 other people do the same thing, for an hour. The server will not have a chance to recover and it will end up looking like a DDOS attack instead of it being something that just took a quick 20 second nap. If you know your website isn’t getting that much traffic, still don’t do it.
The minimum between time for checking a website via refresh should be 30 seconds, unless you are trying to buy those concert or monster truck tickets you have been waiting 6 months for. Then feel free to keep hitting refresh over and over until that buy button shows up. Especially if you have booked a flight and are trying to be one of the first people to check in to get a good seat for the flight. (I am definitely guilty on the flight check in, I really want to be in that A boarding section) However if you are trying to fix an issue with your website, lets keep it to 30 seconds.
3. Can I Log into the Server, cPanel or Plesk?
Here is where it gets a little tricky! For me, I have clients on dedicated servers and I keep the numbers relatively small for how many can go on a server. Now if you are on one of the other hosts with a “Managed WordPress” plan, you may be able to login to the server with no problems. However, if you have cPanel access on the server that will be a good place to check for if you can get into the server or not. Some hosting providers may even have it where you can get onto cPanel and it not show you any major errors, which is frustrating at times when you know you have an issue, but can’t find it.
If you have access into your server and have access to restart your server via cPanel or Plesk, then I would reboot the server or VPS and see if that fixes it. Let me say this, if you are having to do this more than once a month then you have a bigger issue that needs to be addressed with your hosting provider. If you need a new WordPress host or Managed WordPress host, we would love to talk to you about how we can help. (Yes that was a shameless plug)
4. Are There Errors in the Log File?
Reading errors in the log file isn’t for the faint of heart, however if you can take a look at the log file and you see the 503 errors, it may just give you a little more information as to what is causing the issue. On many of the shared or managed hosting platforms you will see that you have either used too much RAM, had too many I/O connections, exceeded your processing allotment, used up your bandwidth or a myriad of other shared/managed hosting platform issues that you can do zero about. Well I take that back, you can change hosts or spend more money with your current host to get more of what you are needing.
Now you may see errors caused by scripts run amuck. Sometimes this is due to an update that you ran on the WordPress core or the plugin itself. In more and more cases we are seeing these due to your site being compromised (aka hacked). If your site has been hacked, then I would suggest hiring someone to clean it up for you (We can do this) or have your provider clean it for you. It will cost you a little bit of money to have it cleaned if it has been hacked, but you need to do it. Then you can check out our checklist to secure your WordPress website (Insert Sign Up Link Here).
5. Am I able to FTP into the Server?
This is another one of those tricky pieces, but it is part of my troubleshooting process so I have to include it. There have been times when I could login via FTP and no where else, these are the moments that make me scratch my head. However on some hosts and managed WordPress providers you may be throttled by the hosting plan you are on, yet you can still get into the FTP portion of your site. This is one of the frustrating parts of troubleshooting issues, as you can clearly get onto the server but may have nothing in any log telling you that you are being throttled by your host. (We don’t throttle our customers btw)
However you need to know if you can get into the FTP portion of the site as you may need to add a line of code to your WP-Config.php telling it to use less RAM or to cut on the debug feature. Its actually pretty amazing how cutting on the debug feature will sometimes show you the issues you are having on your WordPress site after it had been down via a 503 Error message.
6. Is the Issue on Cloudflare?
This is the one piece that I forget about, mostly because I take using Cloudflare for granted. Well I take it for granted until they have some random weird issue that affects my website, then I am left shaking my fist in the air yelling “why you little”. So if you are getting any strange error message, log into your Cloudflare account and put it into Developer Mode. This will allow you to bypass Cloudflare completely and go straight to your server. Then you can sort out for sure if the issue is on your server or not. A lot of people aren’t using Cloudflare, so if you aren’t then and you are still having issues, then it is time to move to the next step.
7. Clear Your CDNs Cache
Using a CDN? Now is the time to also clear its cache. If you are using Cloudflare and you haven’t set it into Developer mode then you may want to clear the cache on CF. (I would clear it no matter what state it is in, just in case.) Cloudflare is great for serving cache content, but it takes the 30 day expiration seriously, so you may want to make sure it is clear. For your CDN service make sure you choose Purge All Files, to make sure it clears everything from the CDN.
8. Clear Your Local Server Cache
If you are able to login via FTP into your server, now would be a good time to clear out the cache folder if you are running a cache plugin on your website. Most websites should be running some type of local cache to help serve your website faster. Typically the folder is in the base of the file structure and is named “Cache”, another place it may be is your WP-Content folder, that is where WP Rocket keeps its cache files. When in doubt you can usually clear out any cache folder in your directories, as it normally needs to be cleaned when you are trying to fix an issue.
9. Can I Log into the WordPress Admin Panel?
Oddly enough, there are times where you are able to get to the login screen for WordPress when your main page shows a 503 error message. This is one of those times where I scratch my head and wonder what is loading on that main page that isn’t loading on the WordPress core. I have also found that sometimes when I can login to WP-Admin, it is due to the issue going away, since it was more than likely a script that was hung and has cleared itself or timed out. Either way, it will help us to sort out where the issues are, or at least help us take the next steps that are only good if we are able to login.
10. Update WordPress Core, All Plugins & Themes
Before you go any further, make sure that all of your plugins, themes and the WP core is up to date. It is amazing to me how many people don’t take care of this one simple step. Actually one of the reasons why you are reading this blog post right now is due to this. I saw how many people were getting hacked or having issues with their websites that just weren’t updating. Being an entrepreneur I knew that I had found a need that I could solve for people, making their life easier and saving them time in updates, backups and troubleshooting. With that being said, this is a major issue for a lot of people running WordPress, they forget about the updates. Worse yet, they think under their “Managed WordPress” hosting that it is being taken care of. Ok, I will get off my soap box about it, so go make sure that you have everything up to date.
11. Clear the Cache From Your Cache Plugin
Before you start rearranging a ton of stuff on your site, make sure you clear your cache. Your cache should be clear if you were able to login via FTP and clear it. However if you couldn’t find the folder, but you have a cache plugin running, you need to clear your cache from the admin panel.
So if you don’t have a button from the host or a button from a plugin to do this, then you probably don’t have any cache. There are exceptions to this rule, but now isn’t the time to talk about “if this and if that”. If you have just updated something on your site and you are suddenly getting these 503 error messages, a lot of times you can just clear your cache and it will fix the issue.
12. Enable WordPress Debugging
This may be one of the most under utilized functions of WordPress, when it comes to troubleshooting issues. You will have to edit your WP-Config.php file to change the setting to “True”. But if you aren’t able to fix your 503 error messages and you aren’t getting enough info from the error message, this is a great place to start seeing where the issue may be on the site itself. Now if you have a server issue, this won’t help you. But if you are having a plugin, theme or WP core issue, this will give you valuable info to use in the process of fixing your issues.
13. Tell WordPress to Use Less Ram
Just below or close to WP_DEBUG you may have something that says “define(‘WP_MEMORY_LIMIT’, ‘256M’);” If you have this line of code, try changing the 256 or whatever that number is down to 32. This will tell WordPress to use less RAM resources and can help get you out of 503 jail, but I don’t suggest leaving this at such a low setting. If merely changing this to 32 fixes the issue, then it will show you that your hosting plan doesn’t have enough RAM to adequately run your WordPress website. A conversation with your host to bump up the RAM (by paying them more money) will fix this in the long term, or swapping to a better host. (I’ve heard we can take care of that for you, wink wink)
14. Disable Your Plugins
If you get this far and nothing is working for you, disable all of your plugins and check for errors. If you have the same error, then the issue is not the plugins. If your 503 error goes away, then one by one enable the plugins and check in an incognito window to see if the error comes back. Now if you find a plugin that is causing the issue, see if that plugin has an update. Another piece I have started doing is checking to see when the plugin was last updated. If it has been more than one year, start looking for a replacement plugin. There was one site that we recently fixed that had 11 plugins that hadn’t been updated by the creator in over 3 years! Yikes! Talk about being left open to getting hacked!
15. Swap the Theme
Swap your theme to a basic WordPress theme like Twenty Seventeen. If you swap the theme and still have the same odd issues, you will know that it is not your theme. Remember to check it in an Incognito window to be sure if this is an issue or not. If the issue is within your theme and you don’t have access your web designer, reach out to us for help. If you do have access to the theme developer, open a ticket with them as they will need to fix the issue. If you have added a lot of custom code to a theme, you should be able to see the errors in Google Chrome Developer Console or if you have cut on debugging via WP-Config.
16. Add Your Base Domain to the Whitelist
Did you know your CDN has a Whitelist? Now you would think that you shouldn’t have to add anything you are doing with your base domain to a Whitelist, however you do. Especially if everything you are serving is via HTTPS and you have SSLs in place on every side to protect your customers. It is better to always have your domain in your Whitelist vs not, even if you don’t need it. I had an issue about a week ago, where the only problem we had, that was giving a 503 error message, was due to not having the domain in the Whitelist. You want your data secure, right? Well have SSLs on each piece and make sure the Whitelist is setup for your appropriate domains. If your CDN is blocking portions from being served it will cause more usage on your server which can continue to cause a 503 error.
17. Add the CDN IP Range to the Wordfence Whitelist
Well now that you have added your domain to the Whitelist, now is the time to add your CDN to your Wordfence or other local security plugins Whitelist. Hey this is a two way street and data needs to move back and forth freely. It will already be secure, if you have an SSL on each side, so you will be ok to add the IP Ranges into your Wordfence Whitelist. Every CDN should have a page in their setup guide that lists their current IP ranges to add to your Whitelist. It is also good to check the updated list every 6 months or so to see if they have added any new servers or dropped any broken server IPs.
18. Wait 3-5 Minutes
Sometimes a script is simply hung up and you have just made a ton of changes, so you may need to give your website a minute to breath and start taking advantage of the changes you have mad. Keep in mind that any changes you make that have to do with the CDN and its cache may take up to 5 minutes to propagate across all the servers, especially if you are on a free plan for Cloudflare. So when you adjust major settings having to do with SSL or permissions on cache files, wait a few minutes so that the changes have time to get to all of the servers.
19. Open A Ticket – Add All the Steps Completed
Congratulations! You have completed all that you can complete for troubleshooting, at this point you should have a good idea of where the issue is and if you can fix it or not. You may have a hosting issue (Typically this is the case), so it is always better to alert the hosting company so that they can fix it for you. The good part of this is that you should have a lot more knowledge about what is going on with your WordPress site so that when you open a ticket you can give them a ton of info. Also at this point you should have ruled out any issues that it may be your WordPress install which means it is a server/hosting issue.
I hope this has helped you some in understanding how to sort out where your issues come from on your WordPress website. If you have anything that I may have missed, feel free to share it in the comments and we will add it in! There is so much info about WordPress out there that it can be overwhelming at times, so I hope that this has helped give you a little clarity.
As a WordPress Concierge client you don’t have to worry about any of these steps. You just open a ticket and we will take care of everything for you! We want you to have piece of mind and ease of use with our service, which is why we say just open a ticket and we will fix it quickly for you.
If you are a Web Designer and you would rather spend your time designing instead of fixing issues, reach out to us. We have a program that is dedicated to Web Designers to help take the technical pieces off your plate so that you can focus on what you love, the design. Fill out the form on this page – https://ishouldbeyourwpguy.com/partner-plan/web-designer and lets schedule a call to discuss how we can help you save time and make more money.
Are you a plugin developer?
Want to hand off part of your help desk tasks? We have a program for you guys that will help you stream line your processes and it is costs you ZERO! Fill out the form on this page to learn more about this program designed to save you time – https://ishouldbeyourwpguy.com/partner-plan/plugin-dev
. . .