Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to make a copy of a wordpress site on my webhost on my local computer. I am using EasyPHP. I downloaded all of the files within content and added them to a folder within EasyPHP\data\localweb\projects. I went on myPHPadmin and created a user and database and connected to it using wp-config.php.

Then to make sure everything was working so far I navigated to the localhost url for the site and it asked me to do an install. After doing the install it works correctly, I can see my custom theme and activate it, and I see all of my plugins that are installed on the live site. However, all of the content from the site is of course in the database.

I drop all of the tables import the live database (which I explorted also via myPHPadmin).

It say 'Cannot connect to database'

I do some research and find I have to do the following query because the URL is different:

UPDATE wp_posts SET guid = replace(guid, old url, new url);
UPDATE wp_posts SET post_content = replace(post_content, old url, new url);.
UPDATE wp_postmeta SET meta_value = replace(meta_value, old url, new url);
UPDATE wp_options SET option_value = replace(option_value, old url, new url);

So I do that and am getting data from the database, but its not working correctly. The main page has a 404 error and has links to the articles that are on the live site but if other than that its just black and white text. No theme or anything. If I click anything I get the following error:

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Also when I add wp-admin to log in I get the same error. Help!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Maybe you should try doing a fresh install of wordpress on your local computer and simply import your website using the wordpress.xml file created via Tools > Export. If you do that, you can take a good look at the wp_options table as this may give you a clue as to what might be going wrong when you import the .sql file.

Chances are that your database query is not catching all the cases in wp_options (or the posts table for that matter - though you may not want to bother with the content, if you intend to reverse the process).

But first, find the link to style.css on the page that 404ed, as that may give you the clue you need.

Then go through wp_options, row by row if necessary, and last search the whole database to see what else needs catching.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.