Noman Riffat
Noman Riffat

Reputation: 185

Wordpress White Screen of Death

One of my client's site was taken down by hosting as it was sending spam, the site was working fine before it was taken down by hosting, I downloaded the wp-content folder from Cpanel and full dump of database. When I run the site at localhost, it shows the blank page on all directories. When I use the dumped database, it goes blank but when i change it to fresh WP database, the sites looks fine, so it means there is some problem or mis configuration on database? I started debugging manually and found that the file wp-blog-header.php is not getting this file

require_once( ABSPATH . WPINC . '/template-loader.php' );

Because I added echo "Oh God why?"; in template-loader.php and it was not showing the result while with the fresh integrated database, it shows the result.

Can someone please give suggestion that what could be the problem in database?

Upvotes: 0

Views: 378

Answers (2)

Casey Dwayne
Casey Dwayne

Reputation: 2169

Your live WP site and your local one will (should) use two separate databases.

  1. In your local phpMyAdmin, make sure you've imported the exported database from the live site.
  2. In your wp-options table, change siteurl to http://localhost/yourpath/toWP.

    This should be pointing to your actual Wordpress folder.

  3. Locate the wp-config.php in your actual WP folder, and make sure the WP_HOME, WP_SITEURL, DB_NAME, DB_USER, DB_PASSWORD, and DP_HOST

All of this has to match up to your local setup, otherwise it will fail (WSOD).

If this doesn't work, it's possible the person that set it up changed some things to make it hard to maintain without him/her. I've seen it done. Personally, I detest WP for things other than blogs. It has a lot of security problems, constantly needs updates, and allows people that really shouldn't be doing web design to toss something together with templates and call it "professional". Good luck!

Upvotes: 1

napolux
napolux

Reputation: 16074

You are basically changing the domain of your WordPress installation from www.example.com (the original domain) to www.example.local (your localhost).

I usually use this procedure to move WP from a domain to local:

  • Download from WordPress site the corresponding version of WP and install it on local.
  • Overwrite the new db with your backup
  • Change wp-config.php to point to the backup db (only if config changed, i.e. table prefix)
  • Follow one of the many guides to move WP to a new domain. Example 1, Example 2 and change the db fields to your local domain (www.example.local).
  • Restart your local apache

It should now be ok to login and regenerate permalinks.

Upvotes: 0

Related Questions