Topics

  • Multiple WordPress Instances with Multiple Databases
  • The Multisite Feature
  • Multiple WordPress Instances with a Unmarried Database
  • Multiple Databases, Same Users

If you lot demand multiple WordPress instances, there are iii types of installations based on organization architecture, or a combination of WordPress instances and databases:

  1. The WordPress multisite feature, which is a single WordPress instance with a single database
  2. Multiple WordPress instances with a single database
  3. Multiple WordPress instances with multiple databases

Let'due south 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

Yous'll demand a separate MySQL database for each web log you programme to install. If you have not yet created these, basic instructions are constitute here.

The wp-config.php file will vary for each installation. The lines to modify are the post-obit:

define('DB_NAME', 'wordpress');    // The proper noun of the database define('DB_USER', 'username');     // Your MySQL username define('DB_PASSWORD', 'password'); // ... and countersign

DB_NAME is the name of the private database created for that blog. If you are using different user logins for each database, edit DB_USER and DB_PASSWORD to reflect this equally well.

Upload each wp-config.php file to its specific root/installation directory, and run the installation. Run across Installing WordPress for more information.

Top ↑

The Multisite Characteristic

If you desire multiple sites to use WordPress, yous can utilize the multisite characteristic 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 data:

  • Earlier You Create A Network
  • Create A Network
  • Multisite Network Administration

Top ↑

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 instance, nonetheless, only a single line is unique to each weblog:

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

Past default, WordPress assigns the table prefix wp_ to its MySQL database tables, just this prefix can be anything yous cull. This allows you to create unique identifiers for each weblog in your database. For instance, let's say you have three blogs to set up, with the names Main, Projects, and Examination. You should substitute the prefix wp_ in each blog's
wp-config.php:

Main blog:

$table_prefix = 'main_';                

Projects web log:

$table_prefix = 'projects_';                

Test blog:

$table_prefix = 'test_';                

As noted, y'all may utilize a prefix of your own making. Those provided here are for example only.

Upload each wp-config.php file to its specific root/installation directory, and run the installation. See Installing WordPress for more information.

Top ↑

Multiple Databases, Same Users

You can utilise the same userbase for all your blogs on the same domain by defining the CUSTOM_USER_TABLE and optionally the CUSTOM_USER_META_TABLE constants to point to the same wp_your_blog_users and wp_your_blog_usermeta tables.
Meet Editing wp-config.php/Custom User and Usermeta Tables.