Reputation: 185
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
Reputation: 2169
Your live WP site and your local one will (should) use two separate databases.
In your wp-options
table, change siteurl
to http://localhost/yourpath/toWP
.
This should be pointing to your actual Wordpress folder.
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
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:
It should now be ok to login and regenerate permalinks.
Upvotes: 0