I have a local server up using EasyPHP. I know its working because I have a default wordpress install running and up on my brower. I have a full site which I also know I have working because when I set up an empty database and then did the wordpress install the theme was working perfectly but without the content. I have a backup of the actual database this site used and when I create a database, and import the data using PHPMyAdmin and connect it in the wp-config.php file I am getting:

Bad Request (Invalid Hostname)

What am I doing wrong?

  • 1
    Have you updated the database with phpmyadmin to reflect the correct URL?
    – GhostToast
    May 31, 2013 at 20:16
  • 1
    What home url (and wordpress url) is in the wp_options table? Update: Ah, @GhostToast was faster. :)
    – Richard B
    May 31, 2013 at 20:17
  • Do you mean siteurl inside wp_options? I did try to change that and I am still getting the same error. May 31, 2013 at 20:20
  • 2
    I wrote a little function to generate the necessary phpmyadmin SQL script for moving from one domain to another. Put before url in one end, and after url in other. Then select it, copy it, paste it in the SQL box in phpmyadmin and presto-changeo. Backup database first though...can't be held accountable :) tools.morningstarmediagroup.com/find-replace
    – GhostToast
    May 31, 2013 at 20:23
  • 2
    Go to Settings -> Permalinks. .htaccess needs to be rebuilt (and this will do that for you just by visiting that page) everytime something major like a URL change occurs.
    – GhostToast
    May 31, 2013 at 21:37

1 Answer 1


Be sure you have updated your database to reflect the correct URL. You can do this in phpmyadmin with a bit of SQL. Good article about it here:


Your Answer

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

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