Title: Change Database
Last modified: August 19, 2016

---

# Change Database

 *  [dane4487](https://wordpress.org/support/users/dane4487/)
 * (@dane4487)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/)
 * So I am having some trouble using an **old** database for my **new** WordPress
   site.
 * I have done alot of searching and found that I could use my old database if I
   edit the wp-config.php file. However, when I did this and put in all of the information,
   my site was coming up with a 500 error.
 * Does anyone have any suggestions? I’m really having a hard time with this.

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

 *  [chkorpsak](https://wordpress.org/support/users/chkorpsak/)
 * (@chkorpsak)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492152)
 * for the table prefix, instead of wp_ make is wp1_
 *  Thread Starter [dane4487](https://wordpress.org/support/users/dane4487/)
 * (@dane4487)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492155)
 * it half worked,
 * I can access my site now, however my posts and stuff aren’t there though?
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492160)
 * that was bad advice
    can you just use the old `wp-config.php`? you should be 
   able to put the correct database name, user, pass and connection as the old site
   should have the same table prefix as the old site
 *  Thread Starter [dane4487](https://wordpress.org/support/users/dane4487/)
 * (@dane4487)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492164)
 * samboll,
 * I tried that first but my whole blog went down and i was getting a 500 error.
 * with chkorspaks advice (editing the table prefixes to ‘wp1_’), i was able to 
   get the site back working, but I still don’t have my old posts or anything.
 *  [chkorpsak](https://wordpress.org/support/users/chkorpsak/)
 * (@chkorpsak)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492169)
 * did you download a xml of your old website posts?
 * Tools => Export
 * Once you have that, you can import the posts into your new website
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492187)
 * just changing the table prefix gives you a fresh install – no posts or comments
   from old database
    have you tried going to host’s phpmyadmin and just importing
   the database?
 * [http://codex.wordpress.org/Backing_Up_Your_Database](http://codex.wordpress.org/Backing_Up_Your_Database)
 * [http://codex.wordpress.org/Restoring_Your_Database_From_Backup](http://codex.wordpress.org/Restoring_Your_Database_From_Backup)
 *  Thread Starter [dane4487](https://wordpress.org/support/users/dane4487/)
 * (@dane4487)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492351)
 * chkropsak,
    I did not, because our hosting was switched and when it was I was
   no longer able to get on to the blog. This is partially why we created a new 
   blog.
 * Samboll,
    I was thinking about your method, we do not have phpmyadmin. I am going
   to download it Monday and try that
 *  Thread Starter [dane4487](https://wordpress.org/support/users/dane4487/)
 * (@dane4487)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492535)
 * ok guys, so I’ve decided not to go with PHPmyAdmin because it is too confusing.
   I have a limited knowledge of all this stuff.
 * We already have MySQLAdministrator (MySQLWorkbench). Would I be able to import
   the database with this program? Can someone guide me through this?
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492538)
 * You could use the MySQL command line to backup and restore your database:
 * [http://codex.wordpress.org/Backing_Up_Your_Database#Using_Straight_MySQL_Commands](http://codex.wordpress.org/Backing_Up_Your_Database#Using_Straight_MySQL_Commands)
 * [http://codex.wordpress.org/Restoring_Your_Database_From_Backup](http://codex.wordpress.org/Restoring_Your_Database_From_Backup)

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

The topic ‘Change Database’ is closed to new replies.

## Tags

 * [500 error](https://wordpress.org/support/topic-tag/500-error/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [wp-config](https://wordpress.org/support/topic-tag/wp-config/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 4 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/change-database/#post-1492538)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
