Title: Switching WordPress Databases
Last modified: August 19, 2016

---

# Switching WordPress Databases

 *  [moonlaugh](https://wordpress.org/support/users/moonlaugh/)
 * (@moonlaugh)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/)
 * I’ve been looking all over the internet for this, and I’ve found out how to switch
   servers, domains, and many more, but I think mine is a special case.
 * Basically, I have two blogs set up on the same domain in different databases.
 * One can be reached through [http://www.examplesite.com/blog](http://www.examplesite.com/blog)
 * The other through [http://www.examplesite.com/otherblog](http://www.examplesite.com/otherblog)
 * What I need to do is put otherblog in the same database as blog, because I need
   to be a ble to share user tables.
 * Everything I’ve tried hasn’t worked, even the wordpress guide for moving wordpress.

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185803)
 * the ONLY thing that controls the db being used are the connection settings inside
   the wp-config.php — thats where the db connection settings are.
 * if you want to share the user table, then see this:
 * [http://wordpress.org/support/topic/164758?replies=13](http://wordpress.org/support/topic/164758?replies=13)
 *  Thread Starter [moonlaugh](https://wordpress.org/support/users/moonlaugh/)
 * (@moonlaugh)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185804)
 * Yes. I have read that, and many others. The problem is, the blogs have to be 
   in the same database to work.
 * I tried editing wp-config.php as well and the blog I’m trying to move broke.
 * As far as I can tell, I haven’t done anything wrong, but it’s still not working.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185807)
 * > I tried editing wp-config.php as well and the blog I’m trying to move broke.
 * of course it did. there are 2 url settings inside the db that tell wordpress 
   where the blog install is and at what url.
 * You are NOT moving a blog, btw. Not the way you are describing it.
 * You are attemtping to share ONE database between TWO blogs.
 *  Thread Starter [moonlaugh](https://wordpress.org/support/users/moonlaugh/)
 * (@moonlaugh)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185808)
 * Yes. Exactly. I don’t mean literally ‘move’.
 * What URL settings do I need to change in order to make them both work?
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185811)
 * if Im going to help you, you need to slow down, and do a little critical thinking.
 * Youve just asked, “What URL settings do I need to change in order to make them
   both work?”
 * you have 2 blogs at separate urls. Obviously you cannot just change url settings
   in either of the dbs.
 * Each blog has its own url. You cant have 2 wordpress installs at the same url.
 * So the answer to your question is “none”.
 * lets start from the beginning.
 * Is the goal to share content, Or JUST the user information?
 *  Thread Starter [moonlaugh](https://wordpress.org/support/users/moonlaugh/)
 * (@moonlaugh)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185814)
 * Just user info. One blog is a comic strip, the other is just a blog. I need them
   to be able to share user tables.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185822)
 * Ok, so you move ONE blog’s tables into the other database. If both blogs are 
   using the same prefix (wp_) you change the prefix on ONE of the blogs.
 * You will need to edit the wp-config.php’s mysql info for the blog you moved into
   the other db.
 * Than you follow the instructions youve already been reading.
 * Here they are again:
 * [http://justintadlock.com/archives/2008/09/20/installing-two-wordpress-blogs-with-the-same-users](http://justintadlock.com/archives/2008/09/20/installing-two-wordpress-blogs-with-the-same-users)
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185828)
 * > Ok, so you move ONE blog’s tables into the other database. If both blogs are
   > using the same prefix (wp_) you change the prefix on ONE of the blogs
 * To elaborate: All of this can be done using phpmyadmin. Look under the operations
   tab.
 *  Thread Starter [moonlaugh](https://wordpress.org/support/users/moonlaugh/)
 * (@moonlaugh)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185836)
 * I was able to do all of that, but now it says I don’t have permission to access
   the Dashboard.
 * > You do not have sufficient permissions to access this page.
 * EDIT: also, is there a way for both blogs to share both tables, as in, just combine
   the two?
 * Because I have a user that signed up on Blog A but not Blog B, and a user that
   signed up on Blog B but not Blog A. And Blog B user isn’t showing up on Blog 
   A’s user tables.
 *  Thread Starter [moonlaugh](https://wordpress.org/support/users/moonlaugh/)
 * (@moonlaugh)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185839)
 * Also, I checked the usermeta tables in the database and it says that my permissions
   are the same in both.
 * I redid it, and now I can’t log into either the main or the secondary blog.

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

The topic ‘Switching WordPress Databases’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 2 participants
 * Last reply from: [moonlaugh](https://wordpress.org/support/users/moonlaugh/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/switching-wordpress-databases/#post-1185839)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
