Multiple WordPress installations on a single database

This article will show you how to install multiple wordpress instances using a single database. It is always recommended to set up separate databases for each wordpress install you do, but it is possible to run multiple blogs successfully using only one database.

When you install a wordpress blog for the first time, you need to enter your database information in the wp-config.php file. When installing multiple wordpress instances across multiple databases, the information you type into the wp-config.php file will vary for each installation. When using only a single database to handle multiple wordpress installations, you will need to keep the information in the wp-config file exactly the same and change only one line of code in the config file. This line of code will be the database table prefix identifier.

By default, WordPress assigns the table prefix wp_ to its MySQL database tables. This can be found in the wp-config.php file, and it is probably something you have never change before. If you normally set up separate databases for each of your separate WordPress blogs, you have never had to change this. However now that you are going to be using a single database to handle multiple installs, you are going to want to change this prefix data to keep the database organized based on the WordPress instance install. By using more than one prefix, you create unique identifiers for each blog in your database. For example, let’s say you have three blogs to set up on one database. You want to name the blogs MainSite, Store and Photos. You want to substitute the prefix wp_ for each blog’s wp-config.php when doing the install. So the wp-config files would like this:

MainSite blog: $table_prefix = ‘mainsite_’;
Store blog: $table_prefix = ‘store_’;
Photos blog: $table_prefix = ‘photos_’;

As noted, you may use a prefix of your own making. Those provided here are for example purposes only.

Upload each wp-config.php file to its specific root/installation directory on your site, and run the installation. For example:

You will get the same install process you are used to, and all of these will store their data in one database.


Related posts:

  1. Install Multiple WordPress Installations Using a Single Database
  2. Exporting and Importing WordPress Databse
  3. How to Change Absolute Links
  4. WordPress URL directory Change
  5. WordPress 1and1 Server 500 Internal Server Errors and NexGen Gallery
  6. WordPress Plugins I love
  7. How to Create Multiple Streams of Income
  8. How to decode encrypted WordPress footers
  9. Change Role Names or Add new Roles in WordPress
  10. How To Remove Author Details from posts In WordPress Blog
  11. Word Press Error 404
  12. WordPress 3.0.1 Image Upload Error
  13. WordPress Perma Links Setting
  14. Offering More Subscription Options
  15. WinMerge – Compare Duplicate PC Files
  16. WordPress
  17. How to make a light duty solar panel junction box
  18. Solar Power/Alternative energy House Project

Leave a Reply