If you need multiple WordPress instances, there are three types of installations based on system architecture, or a combination of WordPress instances and databases:
- The WordPress multisite feature, which is a single WordPress instance with a single database
- Multiple WordPress instances with a single database
- Multiple WordPress instances with multiple databases
Let’s first look at the third type, multiple WordPress instances with multiple databases, because it has the same installation process as the single WordPress site except there are multiple sites.
Multiple WordPress Instances with Multiple Databases
You’ll need a separate MySQL database for each blog you plan to install.
The wp-config.php file will vary for each installation. The lines to change are the following:
define('DB_NAME', 'wordpress'); // The name of the database define('DB_USER', 'username'); // Your MySQL username define('DB_PASSWORD', 'password'); // ... and password
DB_NAMEis the name of the individual database created for that blog. If you are using different user logins for each database, edit
DB_PASSWORDto reflect this as well.
The Multisite Feature
If you want multiple sites to use WordPress, you can use the multisite feature to create what is referred to as a network of sites. The multisite feature involves installing a single WordPress instance and a single database.
The multisite feature appears to be simpler than other types of multiple WordPress installations, but there are some considerations and restrictions. Refer to the following documents for more detailed information:
Multiple WordPress Instances with a Single Database
As with the multiple-database solution described above, the wp-config.php file will vary for each installation. In this case, however, only a single line is unique to each blog:
$table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'
By default, WordPress assigns the table prefix
wp_ to its MySQL database tables, but this prefix can be anything you choose. This allows you to create unique identifiers for each blog in your database. For example, let’s say you have three blogs to set up, with the names Main, Projects, and Test. You should substitute the prefix
wp_ in each blog’s
$table_prefix = 'main_';
$table_prefix = 'projects_';
$table_prefix = 'test_';