WordPress Login White Screen [of Death]

Comments

Recently I had the privilege of helping a friend debug her WordPress site. A few days earlier she tried to log into her site only to find get a white screen where their should have been a login screen. Ultimately her problem was that a file in her “wp-admin” directory had become corrupt – a simple fix.

I’ve had to fix this problem a couple times, and these are a few ways I’ve tracked down the problem. If you’re experiencing the same ‘white screen’ problem, I can’t promise this will solve the problem – but hopefully it will at least narrow down your list of potential problems.

Warning: The following are all relatively safe to try if done correctly – but there is some risk. ALWAYS backup your site before attempting any of the following – including your database, uploaded files, all server files, etc. Also, attempt these at your own risk. If you’re not comfortable attempting these, don’t do it. I don’t want to get any “you ruined my site and destroyed my business” comments.

Prerequisites: comfort with phpMyAdmin or executing command SQL prompts and FTP access to your web server.

Check Your Plugins Using File Directory

One of the most common problems that plagues a WordPress site is plugins. Conflicts between plugins, conflicts between a plugin and the theme, conflicts with a plugin and WordPress after an update, etc. They’re brutal. Most WordPress help sites suggest the first thing you do if you’re having a problem is to deactivate all your plugins. With the white screen problem, we can’t get to the plugins, so we need to try another way. The simplest way is to rename your plugins directory. Using your favorite FTP client or through your hosting control panel, navigate to ‘/wp-content/’. You should see the directories plugins, themes, upgrade, and uploads. Rename your plugins directory to ‘plugins_old’ or something like that. Then try to refresh your WP login screen.

WP Plugins

If that does not solve the problem, simply rename the directory from ‘plugins_old’ back to ‘plugins’.

Check Plugins Using Database

You can also try disabling your plugins through the database. To locate them you will need to log into phpMyAdmin (or whatever you use to access your database).

Next, you will need to query your WordPress options table (wp_options) for the “active_plugins” row. Open your SQL panel then paste the following. Note, if you do not use the default ‘wp_’ WordPress table prefix, you will need to update the table name in the query.

SELECT *
    FROM wp_options
    WHERE option_name = 'active_plugins';

The result should have “active_plugins” in the ‘option_name’ column and look something like this in the ‘option_value’ column. The exact contents and size will vary depending on the number of plugins you have installed and active.

a:4:{i:0;s:41:"all-in-one-favicon/all-in-one-favicon.php";i:1;s:32:"disqus-comment-system/disqus.php";i:2;s:35:"googleanalytics/googleanalytics.php";i:3;s:41:"simple-ads-manager/simple-ads-manager.php";}

To deactivate the plugins, copy the contents of that column and save them in another file on your local drive – you may want to reactivate the original set of plugins. After you have copied the contents of the ‘option_value’ column, you need to empty the column. Not every editor is the same, but you want to edit that row, leaving all the fields exactly the same except deleting everything out of the ‘option_value’ column. It should look something like this.

WP Plugins

You can also clear the column by running the following SQL statement

UPDATE wp_options
    SET option_value = ''
    WHERE option_name = 'active_plugins';

Again, update the table name if you changed the table prefix from ‘wp_’ to something else.

Once you have removed the plugins in the database, try to refresh the WordPress login page to see if the login screen appears. If not, you will want to copy the contents from the ‘option_value’ back to reactivate your plugins.

Check For a Theme Conflict

This one is a little trickier and requires accessing the sites file system and database. Again, please make sure you have both the site and the database backed up.

First, download a clean copy of WordPress from WordPress.org.

Second, using your favorite FTP client or your web hosts control panel, open the ‘wp-content’ directory. You should then see a directory named ‘themes.’ Rename the directory ‘themes_old’. Then, from the clean copy of WordPress, upload the ‘themes’ directory. This should contain just a few of the default WordPress themes.

WP Content folder

WP Themes

By doing this, you’re essentially “hiding” your current WordPress themes and replacing them with a theme that you know will work. However, you will still need to set the theme name in the database. To do this we need to find and modify three options in the database. To find them, go into phpMyAdmin (or your preferred method to access the database) and run the following (remember to update the table name if you are not using the ‘wp_’ prefix).

SELECT *
    FROM wp_options
    WHERE option_name = 'template'
    OR option_name = 'stylesheet'
    OR option_name = 'current_theme';

This should give you a result that looks something like this:

WP Themes

We will need to replace these values to match one of the themes you just uploaded from the clean WordPress download. Here’s where they come from:

Select one of the themes that you just uploaded as the theme you want to “test” with, then open the theme’s style.css file. Once you have all the correct information, update the fields appropriately. For this example, I’m using the WordPress theme Twenty Fifteen. After updating the fields, the rows look like this. Make sure you save your current theme values before changing them so that you can revert back if desired (i.e. copy the values and save them on your local drive).

WP Themes

After making the changes, attempt to hit the WP login page. If you do not see the login screen then your themes may not be your problem. To revert back to your original theme, change the values in the database back to what they originally were. Then in your FTP client delete the ‘themes’ directory (remember this should be the new one you just uploaded with the default WP themes to test with). After the ‘themes’ directory has been deleted, rename ‘themes_old’ to ‘themes.’ This should bring back the theme you had set before you made any changes.

Check For Corrupt Includes or Admin Files

This ended up being my culprit. I figured it out pretty quickly by looking in the server logs for errors. If you know how to access your server logs, you may want to start there.

Before going to an extreme like uploading an entirely new copy of WordPress or starting over from scratch, there’s one more fairly simple thing we can check – see if there are any corrupt includes files or admin files. The easiest and safest way to check this is to upload the ‘wp-includes’ and ‘wp-admin’ from a clean copy of WordPress from WordPress.org.

After downloading the new copy of WordPress we need to “disable” the existing directories and replace them with new, clean copies. Let’s start with the ‘wp-admin’ directory. Using your FTP client, go to the root of your site. You should see the directories wp-admin, wp-content, and wp-includes along with a bunch of other WordPress files. Rename the ‘wp-admin’ directory to ‘wp-admin_old.’ After the directory is renamed, upload the ‘wp-admin’ directory from your clean copy of WordPress. Your directory should look something like this.

WP file

Try loading your WordPress login page. If it now works – success! You can either leave the old ‘wp-admin_old’ directory or remove it (I removed it). If this did not solve your problem, you can revert back by deleting the new ‘wp-admin’ directory then renaming ‘wp-admin_old’ back to ‘wp-admin.’

If the problem still exists, we can try the exact same thing with the ‘wp-includes’ directory. In the same directory, rename ‘wp-includes’ to ‘wp-includes_old.’ Then, upload the ‘wp-includes’ directory from your new copy of WordPress. Your directory should look similar to this.

WP files

Again, try loading your WordPress login screen. Work? Success? If so, you can either remove your original wp-admin_old directory or keep it (again, I removed it). If this did not solve the problem, you can revert back to your original files by first deleting the new ‘wp-includes’ directory then renaming ‘wp-includes_old’ back to ‘wp-includes.’

Conclusion

Hopefully one of those solutions worked for you, but we all know that WordPress can be challenging at times. If these didn’t work for you, but you solved the ‘white screen of death’ on the WordPress login screen problem some other way – I’d love to hear how.

© 2019, All Rights Reserved • Built with Tailwind CSS