Here are a few easy methods for fixing a broken WordPress site before you have to get help.
You just went to your site and nothing is loading. You have a broken WordPress site and you’re freaking out.
Well get it together! We have to get it back up. You’re the leader in cat gifs. The world needs you.
Let’s walk through some common issues.
It’s Not You, It’s Me
Pop your URL in there and it will tell you if its just you or everyone. If it’s just you we can breathe a minor sigh of relief but we’ll still need to tredge on.
Identifying common issues
White Screen of Death
Windows had the blue screen of death, Xbox 360 had the three rings of death, and WordPress has the White Screen of Death (WSOD).
This one is pretty easy to identify. Instead of your site you’ll only see a white screen. If you’re in a dev environment or have WP_DEBUG on your may see an error message.
This usually signifies there is a PHP error somewhere in your theme or plugin code. Or a core WordPress file. But it shouldn’t be that. You wouldn’t ever edit a core file, would you?2
Its less catchily named “Page Stops Displaying Anytning Halfway Down the Screen of Death” sibling also usually comes from a PHP error. Just one later in the displaying process.
These errors can typically be caused by out of date plugins or themes or updates gone awry. So see if you have any updates available and run them.
If you can’t get into your backend, hang on. We’ll cover that in a minute.
Determine the Error
The first step to solving the issue is knowing what caused it. If you only have a blank white screen that is difficult. Luckily WordPress has a tool to help called WP_DEBUG.
To activate WP_DEBUG you’ll need to edit your wp-config.php. My preferred method is using an SFTP connection and a text editor. If you don’t have SFTP or FTP setup you can also usually do this from the cPanel file editor.
All you need to do is open the wp-config.php file and add the line
define(WP_DEBUG, true);. I usually add it in directly above the
/* That's all, stop editing! Happy blogging. */ line.
Then reload your error page and hopefully you’ll see an error like this:
Fixing a PHP Error in a plugin or theme
If you’re really lucky it will narrow the error down to the exact file and line it is on. If the path leads to a plugin you’ll want to deactivate that plugin and see if it needs an update. Otherwise delete it and try reinstalling.
If it leads to your theme you’ll want to switch themes and see if your broken theme has an update available. Hopefully it does and fixes your issue.
If WP_DEBUG doesn’t narrow it down to a specific theme or plugin you’ll want to login to your WordPress admin and start deactivating plugins one by one until your site comes back up.
If you make it through all your plugins then it’s time to switch themes.
What if You Can’t Acess the Backend
If you can’t access your WordPress admin you’ll need to manually deactivate your plugins. This is very easy to do with FTP access. Simply connect to your site through FTP and rename your individual plugin folders in the /wp-content/plugins directory.
Throwing a 1 at the end will suffice. Alternatively if you want to mass deactivate all your plugins at once you can rename the plugins folder.
If this brings your site back up, great! But you’ll still want to determine the individual plugin causing the issue. To do this login to your site and navigate to your Plugins page. You will get a warning that all of your plugins are deactivated because their files can’t be found.
Now head back to FTP and rename your plugins folder to the original name then go back to WordPress and start activating plugins one by one until the error reveals itself.
If you get them all activated and your site works fine then congratulations! You essentially completed the WordPress “did you try turning it off and back on” method of troubleshooting.
White Screen But Only Down For You
If you’re getting a white screen but it’s only down for you on downforeveryoneorjustme.com then you could be locked out. If you use a security plugin like iThemes Security the default lockout page is a white screen with the word “error” at the top.
Typically this is due to hitting a limit on failed login attempts or too many 404s in a specified period of time. You can usually wait this out for a few minutes until the lockout clears and try again.
If the issue persists you’ll need to deactivate the security plugin using the renaming method above or connect the wp_itsec_lockouts table in your database and clear the row with your IP.
This is typically a local error only effecting you. Essentially a script hung up on your system and your browser didn’t get the response it expected from the server when it was expecting it.
This can usually be fixed with a simple page refresh or clearing your browser cache. There are more advanced techniques as well if refreshing doesn’t solve it.
This Site Can’t Be Reached
This could be two things. You’ve got an issue with your internet connection or there’s a server problem.
First try to navigate to a different site. If it doesn’t load check your wifi connection. If it does load it’s probably time to get your hosting provider involved. Contact support.
This page is insecure
This error typically arises from trying to connect to a site using https when there is no SSL certificate on the server or the certifacte doesn’t match the server domain.
Try inputting http directly in the URL. If you’re being redirected to https. Clear your cache and try again. If that still doesn’t help you can check in the wp_options table for the site_url and home fields and make sure they’re using http URLs.
Or just get a free Let’s Encrypt SSL certificate installed by your host and benefit from the http/2 protocol and SEO boost of a secure site.
Most hosts offer free Let’s Encrypt certificates now.
You’re Back Online
Congrats! You took a site down and got it back up. You’re officially a WordPress developer. Now go out there and keep breaking (and then fixing) stuff.
If you’re still having trouble feel free to shoot me a message.