How to debug problems on wordpress migrations

I migrated my blog from one server to another, and was seeing the usual white-screen-of-death on the page. I tried enabling debugging with

define('WP_DEBUG', true);

in the wp-config.php file. But this does not work on some webservers if some option (that I dont remember) is not enabled. So instead, I used the poor man’s debugger: the print statement.

So I went into the wordpress/wp-admin directory, and started with the index.php file. I inserted

print('hello world');

statements after each line, and then I’d reload the page and see if the print statement executed. If it did, I moved the print statement further down the file to see what failed. I was able to finally trace this to a statement of the form

requireonce(dirname(dirname(__FILE__)). '/wp-load.php');

which was not working as intended. The dirname(dirname(__FILE__)) statement is supposed to ascend to the parent of the directory of the current file. This was not working as intended. I just changed this to


My dashboard started working again after I made this change!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s