Support » Fixing WordPress » Moving blog offline onto XAMPP, where to put database?

  • Resolved David Borrink


    I’ve taken my wife’s WP blog offline and installed XAMPP to keep it local on her PC for reference in her writing.

    I copy all the WP files to the XAMPP/htdocs folder, but there appears to be no clear instructions on where to place the existing database files to access her blog. The instructions at don’t seem to have any instructions on how to use an existing database. It looks like it’s only set up for telling me how to start a new file. I placed the database in the htdocs folder, edited the wp-config file with so that the define(‘DB_HOST’) line now points to ‘localhost’ instead of the server location it was at, and I get a “cannot establish database connection” error.

    I kept the DB_NAME, DB_USER, and DB_PASSWORD lines the same. Obviously the database will still need to use those.

    I know XAMPP works, because I typed localhost/index.html and the “It works!” html file came up. So I’m obviously not putting the database in the right place or my wp-config file is not set up right.

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you installed xampp then MySQL is already installed and should be accessible via the menu at the link

    Of course you would need to have a backup of your wife’s database from the other host and then restore via phpMyAdmin on your local machine.

    If that is not possible, consider doing the Manage->Export process on the old blog, install WordPress on the local PC, then use Manage->Import->WordPress to import the data.

    Installing WordPress Locally
    Moving WordPress
    WordPress Backups


    I do have a backup of my wife’s database, that’s what I’m working with. What I need to know is where to put it. I placed it in the htdocs folder in XAMPP. And since I changed the wp-config file to look for it in ‘localhost’, shouldn’t it be recognized?

    I do understand that MySQL is installed, I just need to know where I’m supposed to place my wife’s backup database and properly configure the wp-config in order to make her old blog work locally.

    In your links, what would be helpful is a “Moving WordPress from Online to a Local Machine”

    Oh, I think I see what you’re saying. I need to create a new database in XAMPP and then RESTORE it with the backup of my wife’s database. Correct?

    Yes sir.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Moving blog offline onto XAMPP, where to put database?’ is closed to new replies.