Blank Dashboard and Administration Screens on WordPress

image

Apparently, there are a number of potential causes of a blank or empty screen when trying to access the Dashboard or administration screens of a self installed version of WordPress.

Before doing anything to your installation, I’d strongly suggest making a complete backup of your Database and installation folders. If your web host offers a handy way to do that, take advantage of it. There are plenty of walk-throughs on the Internet available with explanations of how to manually perform a backup. Don’t skip this step.

The most common apparently is a bad or incompatible plug-in. To test that theory, using an FTP application, just rename the plug-in folder that’s located in the wp-content folder.

image

Navigate to the root of your WordPress installation, then the wp-content folder. Rename the folder currently named plugins to something like plugins-test. This temporarily disables the plug-ins. Don’t worry, the settings for the plugins aren’t stored here.

Try again to navigate to the Dashboard.

Some suggest that a bad theme can also cause this problem. Assuming you haven’t directly modified the original copies of the themes of WordPress that are included with the default installation, twentyeleven and twentyten, rename the folder of your current theme (just add “-test” to the end again for example). This causes WordPress to revert to the default (which currently is twentyeleven).

Try again to navigate to the Dashboard.

Another option is to delete several of the folders of your installation and copy in the current versions. (Follow this if you’d like to try it). While fun to do, it didn’t help with my problem.

In my case, and the reason I’m posting this, is that it wasn’t any of those things. Somehow, the configuration file located in the root of the WordPress installation was no longer compatible with the current version of WordPress. I have no idea how this happened.

I made a copy of the original file wp-config.php (by copying it locally to my computer). If you just make a backup on your web site host, don’t give it an extension that makes it downloadable as it contains the keys to your installation. Smile

Open the copy of the wp-config.php file that you’ve made locally on your computer. By doing that, it will be much easier to grab the values from there that you’ll need shortly.

Now, as soon as you perform the next step, your web site will be unavailable for  a few moments while you get things running again. It’s up to you if you want to do something special during this time (you could make a backup of index.php for example and edit the file to say that your site is undergoing a bit of maintenance).

I chose not to as I knew that it would take about 30 seconds to create a new configuration file.

Delete the file, wp-config.php from the root installation directory. Your web site is now officially down.

Now, using your browser navigate to the root folder of your WordPress installation and append wp-admin/install.php to the URL. It might look something like this:

www.example.com/blog/wp-admin/install.php

“blog” represents the root of the WordPress installation in the example above.

WordPress notices that your installation is missing a configuration file. Go ahead and walk through the few steps. Refer to the original wp-config.php file that you opened locally to provide answers to its questions. Pay attention to the table prefix question in particular and make sure that it matches with what you were using before. Look for a line that looks like this in the configuration file:

$table_prefix  = ‘wp_’;

The value in single quotes (wp_ in the example above) represents the prefix for the database tables that were created and being used by your WordPress installation. If you’re using a shared database, it’s very likely that you didn’t use the default of wp_. If you don’t match these up, you’ll end up with a completely fresh installation of WordPress, which isn’t likely what you want. (Don’t worry, if that happens, delete the config file and start over and this time, be sure to enter the correct prefix).

The other questions it asks should all have equivalents in the wp-config.php file you’ve got opened locally.

image

When it’s done, try logging in again. As soon as I completed the steps above, the WordPress Dashboard became available again. I renamed the plugin folder (removed the “-test” I’d added) and renamed my theme folder (again, by removing the “-test” I’d added). I went to the Plugins to re-activate each of them (as apparently, they became deactivated by default).

I verified the web site again was working and behaving as expected, and went on my regularly scheduled day. Hours lost: 3. Sad smile

Hopefully this will help someone else.

(FYI, the new configuration file that was generated by the “fresh install” was syntactically and structurally different from the original. I don’t know why this was the case or when it happened, but I was happy to get things working again).