I recently had a system crash and had to reinstall WordPress with my backup files.

In the JavaScript log I began throwing errors pertaining to the domain and realized I was still using the remote servers URL. So, I read the Changing the Site URL article in the WP Codex and added the following two lines to my config.php file:



If I go to localhost:3000 in my browser, it goes instead to localhost and loads the Apache server It works! page. However, I am using PHPs built in server. So please don't drag Apache into this.

I do have the ability to go to localhost:3000/wp-admin and login with admin credentials, however when I try to click any of the admin links, I get a 404 not found:

The requested resource resource name was not found on this server.

Everything was working before the system crash, and I'm fairly confident I started the PHP server in the appropriate directory. Will someone viewing this both tell me how to fix this error, but also more importantly, explain why I can't visit my local version of the site?

Any assistance will be much appreciated. Thanks.

  • Have you tried going to Settings > Permalinks, hitting the Save changes button? Dec 21, 2015 at 7:35
  • Thank you for the suggestion, but I am unable to go to settings, it is an admin link. I get a 404 not found. Dec 21, 2015 at 8:33
  • Where have u put your wordpress file? please add information to ur question regarding directory structure and show how is ur wordpress root location on ur system Dec 21, 2015 at 9:11
  • home/user/work/website is the location of my Wordpress install. It is here that I invoke the PHP server as the WP index.php page is here. Dec 21, 2015 at 21:37

3 Answers 3


Instead of renaming, set up your local web server to handle requests to that domain and modify your local hosts file to associate the domain with ip

Especially when debugging hard to find bugs you will want your enviroment to be as similar to the one of the live site.

(I can do it in a not very modern version of WAMP and therefor I assume you can do it with all similar web servers)


You can go to your database and check for wp-option table. In that if you will try changing the siteurl and home, I think this will help you out.

  • A fine idea. However, this did not work for me. Besides, I believe my define statments in wp-config.php account for this. Dec 21, 2015 at 8:39

dump database from remote server open .sql file in a text editor find and replace remote urls to localhost then import the database in localhost

as birgire suggests: this idea is not good for some databases with serialized arrays so i suggest this tool which i have tested and found helpful:


  • 2
    Note that this might not be a good idea for serialized arrays stored in the database
    – birgire
    Dec 21, 2015 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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