Title: database error on migration
Last modified: August 31, 2016

---

# database error on migration

 *  Resolved [Kruble](https://wordpress.org/support/users/kruble/)
 * (@kruble)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/)
 * I just manually migrated (copied) all my finished wp site files from a sub directory
   to the root directory. I also changed the wp-config.php file (as per support 
   instructions) to read:
 * define(‘WP_HOME’,’[http://kevinruble.com&#8217](http://kevinruble.com&#8217););
   
   define(‘WP_SITEURL’,’[http://kevinruble.com&#8217](http://kevinruble.com&#8217););
 * Now when I try to open my site through the url, I get
    “Error establishing a 
   database connection”.
 * There is obviously some code missing to let the database connect, but I have 
   no idea where to look or what to change.
 * Any help appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012413)
 * First of all, remove those defines. They’re for temporary emergency use only.
 * Fix the `siteurl` and `home` values directly in that database: [https://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database](https://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database)
 * You’ll find phpMyAdmin in your hosting account’s control panel.
 * Next, check your wp-config.php file and make sure that your database username,
   password, and host are correct for your current hosting environment.
 *  Thread Starter [Kruble](https://wordpress.org/support/users/kruble/)
 * (@kruble)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012528)
 * James Huff: Thanks for the feedback. I carefully did as you suggested, changing
   the database values and removing the defines. Also all data in wp-config is correct.
 * Still getting that database error message. The sub-directory url is still functioning
   correctly as a site.
 * I might mention one thing I’ve done differently is leave the bulk of the wp site
   in the sub-directory and only copied the .htaccess and index.php files into the
   root directory, (as per codex instructions) so I’m trying to actually trying 
   to get the site url to point to the subdirectory (or home) url.
 * Any thoughts appreciated.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012529)
 * Not being able to access the MySQL database isn’t really related to where the
   files are.
 * If you are sure that the connection details in wp-config.php are correct, contact
   your hosting provider to ask why your database is offline.
 *  Thread Starter [Kruble](https://wordpress.org/support/users/kruble/)
 * (@kruble)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012536)
 * OK, thanks…I’ll try that.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012537)
 * You’re welcome!
 *  Thread Starter [Kruble](https://wordpress.org/support/users/kruble/)
 * (@kruble)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012548)
 * I called Godaddy…they were very helpful…seems I had errantly changed the site
   configuration to multisite which was conflicting things.
 * Thanks again for your response. Marked as resolved
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012553)
 * Thanks for letting us know what it was!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘database error on migration’ is closed to new replies.

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/database-error-on-migration/#post-7012553)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
