Your WordPress blog has crashed … now what?!
Not a happy day when this happens. I know, I had one. Luckily, just one.
For a new blog this isn’t actually that big of a deal. In most cases you can go even as far as installing the whole blog one more time, and tracking down the cause of the crash, but for blogs that have been around for a while and have a constant stream of people visiting them this may result in some serious consequences…
I’m not exaggerating here. Imagine you’re using WordPress to run your site where you’re selling a product or something, and the thing crashes just a couple of hours before TechCrunch was supposed to publish a post about you. Or even worse … it is your client who experiences such a scenario … guess who is to take the blame.
As I mentioned, this happened to me. Well, I didn’t have a TechCrunch coverage waiting in line, OK, but the day was painful anyway. I didn’t see it coming. I wasn’t prepared. I didn’t know what to do at first. In other words … it was beautiful. Here are some things I learned that day.
Protecting your blog against WordPress crashing
Well… actually there’s not much you can do in terms of the crash itself.
There are four things you can take care of that will minimize the possibility of such an event occurring.
• Use a good and trustworthy hosting service. When selecting a provider try to find some information about downtimes, support (is it 24/7 by phone), and customer reviews.
• Install only quality themes and plugins. You don’t really need every new plugin that gets released, only a few essential ones will do.
• Do not use “admin” as the login for any account on the blog.
• Make sure that the passwords are complex and don’t contain any dictionary words. This goes for your WordPress accounts, database account, hosting account, and FTP account.
The above precautions are a must. I know that using a password like “ilovebeer” is easier to remember and quicker to type into the field, but it’s really not worth it. That being said, the unfortunate truth is that these precautions won’t protect you against WordPress crashing, so you need to take care of some additional things if you want to be able to get your blog back to work as soon as possible.
First of all, have a backup strategy. In some cases, a backup might be your only way of getting your blog to work again.
Secondly, remember to update your blog safely every time you do it. A great deal of crashes happen immediately after or during an update. This is due to the fact that it’s the time when many files get altered by new code, which can sometimes act strangely.
… OK, so your blog crashed anyway; what to do? Here’s the first step:
What did you do?
Most of the time a crash happens right after you’ve changed something in your blog. Maybe you’ve installed a new theme, or a new plugin, these are the basics. Maybe you’ve been doing something more complicated, like implementing a hack, or even altering the WordPress core files.
Simply take a piece of paper and write down everything you’ve done most recently. It’s most likely the first item on the list that caused the crash. Simply reverting it will get the job done 90% of the time.
Anyway, in my case the crash was caused by two plugins not willing to work with each other. Here’s what I did, and what I think is a good strategy for dealing with most crashes of this kind.
1. You need FTP access
You need a way to get to your hosting account and access all the files directly, hence FTP.
2. Delete the plugins
Delete all the new plugins you’ve installed lately. If your WordPress admin has crashed also (which it did in my case) then you don’t have a way of doing it properly. In such a case just connect to your site via FTP and delete the subdirectories in your plugins directory. Don’t worry, you won’t lose the settings of your plugins. Those are stored in the database.
Nothing? Still crashed?
3. Move the theme
Actually, just change the name of your theme’s directory. This will force WordPress to switch to the default theme. This should solve the problem. The default theme is not the default theme without a reason. It has been constructed to be 100% in tune with all the other parts of WordPress and cooperate with everything else without a glitch.
4. Restore from a backup
At this point I’d advise to simply grab a backup and restore the site using it. If it’s not the theme or the plugins then who knows what it is. Using a backup is often the easiest and fastest way out.
Now, this is really unlikely, but if your site is still not working it means that your core WordPress files are in some way corrupted. So take the final step.
5. Remove WordPress
This sounds big but actually it isn’t. What you do is make a copy of your wp-config.php file and then delete the whole WordPress directory from your hosting account.
By the way, I hope you still have your backup of the wp-content directory. It will come handy in a minute.
Then you take a fresh ZIP file of WordPress and extract it where the old one used to sit. Next bring back your wp-content directory. Finally copy the old wp-config.php file into the main directory. After doing all this your blog simply has to give some signs of life again.
0. Turning everything back on
If at any point your blog has started to work again you need to be careful when enabling all the plugins back and activating the old theme.
Activate one plugin at a time carefully observing all effects it has on your blog. At some point your blog will crash again but this time you can identify the cause of this crash immediately and eliminate it.
What if you didn’t do anything?
You’ve simply woken up and your blog isn’t working, and it’s not related to anything you’ve done? Well, this is the real fun stuff.
Three main things might have happened:
• You got hacked.
• The crash is due to a server error.
• The site crashed because there was too much traffic to it.
The last two scenarios on the list is where you should start your investigation. Contact your hosting company and ask what’s going on. Remember when I said that 24/7 support by phone is something to search for? That’s why.
If it was a server error or a traffic crash then it’s something the hosting company should handle on their own. And you should use this time to search for a new hosting provider or selecting a more expensive hosting plan. If your site has crashed due to any hosting related issues then it’s likely to crash again in the future.
If the host says that everything is fine you’ve probably been hacked. A hack can be a tough thing to deal with. In my opinion using your backup is the best way out of it. You should also change your passwords immediately after bringing the site back up. Now, why am I telling you not to fight with hacks by trying to go into the source code and looking for changes? This is simply not worth it. You never know how deep the hack goes. Even if you manage to remove the direct cause of the crash you never know what else is still sitting in other places. Therefore, you can never be 100% sure that all changes have been reverted until you use a backup.
As far as I can recall I think I brought my blog back up within one hour. This was the time it took me to delete all plugins, and then turn them back on, one by one until I identified the problem. From that point on I am very careful when installing anything new on my blog. It’s like a box of chocolates … you never know what you’ll get.
I hope a situation when you have to use any of these techniques never occurs. An odd thing to say for a post’s author, but anyway, I really wish this to be the case.
Were there any epic crashes in your WordPress career? Feel free to share.
IMPROVE PAGE SPEED SCORE BY 78%
Find out how to get a higher score on Speed Test
Join our mailing list to receive your FREE ebook about how to boost your site speed, along with the latest news and giveaways.