Welcome, Guest. [ Log In ]
Question   Can I install multiple copies of WordPress in the same database?
Search KBase


Top 5 in this Area:
1. How do I set up a WordPress weblog on DreamHost?
2. What is comment spam and how do I stop it?
3. How do I upgrade / migrate an existing weblog to WordPress?
4. What should I put for "hostname" for my new mysql database?
5. Can I install multiple copies of WordPress in the same database?

 
Can I install multiple copies of WordPress in the same database?
Yes, but it's a bit tricky..

To install the second (or third, fourth, etc... there's no limit!) WordPress install in the same database as your first you first go install it as usual, choosing the same MySQL database you already used once.

But this time, after you get the email telling you the URL to go to to finish your install, first find your wp-config.php file in your WordPress directory and edit it. Find this part:

// Change the prefix if you want to have multiple blogs in a single database.

$table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

Change 'wp_' to be anything else (because your first WordPress is already using 'wp_'). Maybe choose 'wp2_' for example!

Now continue with your set up as normal and you'll be all set to have two WordPress blogs running off the same database!

Last updated: Dec 20, 2005.