Don’t tell me: you were feeling spunky and went ahead trying to edit a live PHP file, or were in a rush and did your WordPress updates on your live site… and when you go to view your hard work, your heart sinks: your website has been replaced by a cryptic error message or the white screen of death.
NOW what the hell do you do?!
Don’t worry, superhero, I’ve got your back! We’re gonna cover what to do when your website breaks, everything from calling your hosting provider to checking basic website files – and how to prevent it from happening again.
First, make sure you’ve got the basics in order: that your domain and hosting haven’t expired and you’ve been paying for them (if you haven’t, log into your account and go take care of that! Don’t come cryin’ to me if you stop paying for a vital service and they take your site down!).
For context in what to do when your website breaks, let’s discuss what can cause your website to break in the first place and then we’ll dive into how you fix the issue if/when it happens.
These things can break your website
- Updates: plugins, themes, WordPress core
- User error: Installing a new plugin or tweaking (*ahem* tinkering with code you don’t know anything about *ahem*)
- Getting hacked
- A server crash
- A DNS problem, or an expired domain
- Expired hosting
Therefore, things that you wanna do on a test site rather than your live site include:
- Updates: plugins, themes, WordPress core
- Code tweaks (which can involve user error)
- Installing a new plugin
What to do when your website breaks
Make sure it’s actually down
Check Where’s It Up? or Down for Everyone or Just Me? to confirm whether your website is down just for you or for everyone. It happens that connectivity issues fool us into thinking a website is down sometimes when really it’s just a shitty internet connection!
Check for malware
I’ve written about this before: hackers are after your website, so you gotta take proactive steps to give it protective superpowers — like installing a killer security plugin, replacing your default admin user with a safer one, and using an ultra-secure password for your user account — plus keep your maintenance going (update your shit! A.K.A. your theme and plugins and WordPress itself).
Often, when a website breaks, it’s because it’s been hacked. Run it thru sitecheck.sucuri.net to check for malware and find out if Google has blacklisted it. If that’s what happened, I highly recommend you go to Sucuri — they’ll clean up your site and de-blacklist you in record time (12 hours!). Very much worth the $200.
Not hacked? Hooray! Keep readin’…
Call your host
If you weren’t haphazardly tinkering with your website’s code and have no idea what happened, your quickest bet will probably be to call your hosting provider. I know you’re freaking out, but be nice ;)
They can check your error logs and other data to let you know where the error lies — maybe a plugin rewrote your .htaccess file (happened to me a few times!) and screwed everything up, or maybe your server is down (this just happens sometimes, truly no hosting provider has 100% uptime) and they’ll have it back up in a little bit.
If you updated a plugin and that broke your site, the kind support fairy on the other end of the phone may be willing to change the name of the plugin folder for you to test if it’ll bring your website back up (or you can do it yourself by logging into your cPanel or via FTP and looking for the plugins folder located at wp-content/folders).
Knowledge is power, so find out what’s up to get some peace ‘o mind. And if you’re too freaked out to deal with it yourself, calling your hosting provider is a legit way to find out what’s up.
Restore a backup
If the server is fine and instead there’s a problem with your website, perhaps precipitated by an update (this is why I recommend doing updates on test sites) or changing the code somehow (same dealio!) what you can do is restore a backup. In other words, take the most recent backup of your website from before the change was made, and bring it back to life, replacing your broken website.
Keep in mind that if your site’s been hacked, your backups are probably infected as well, so you’ll need to splurge on Sucuri (see step #1).
If your hosting provider sucks or isn’t accessible via phone, it’s very important to move to one (like Liquid Web or Siteground) that understands WordPress and provides stellar customer service. You don’t want Mon-Fri email support during a tear-your-hair-out emergency!