Do you need multiple WordPress instances?

If you need multiple WordPress instances, there are three types of installations divided by System architecture or combination of WordPress and database.

  1. Using WordPress’ Multisite feature, Single WordPress instance with Single database installation.
  2. Multiple WordPress instances with Single database installation.
  3. Multiple WordPress instances with Multiple databases installation.

At first, let’s see the 3rd one “Multiple WordPress instances with Multiple databases” because it is the same installing process with the single WordPress site except the number of sites.

Multiple WordPress instances with Multiple databases

You’ll need a separate MySQL database for each blog you plan to install. If you have not yet created these, basic instructions are found here.

The wp-config.php file will vary for each installation. The lines to change are:

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

DB_NAME will be the name of the individual database created for that blog. If you are using different user logins for each database, edit DB_USER and DB_PASSWORD to reflect this, as well.

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

Multisite feature

If you want multiple sites using WordPress, you can use multisite feature to create what was referred to as a ‘Network’ of sites. Multisite feature install single WordPress and database.

Multisite feature seems to be simpler than other multiple WordPress installation, but there are some considerations and restrictions. Refer following documents for more detail information:

Multiple WordPress instances with Single database

As with the multiple databases solution described above, the wp-config.php file will vary for each installation. In this case, however, only a single line will be 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. By using more than one, you 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 want to substitute the prefix wp_ for each blog’s wp-config.php:

Main blog:

$table_prefix = 'main_'; 

Projects blog:

$table_prefix = 'projects_'; 

Test blog:

$table_prefix = 'test_'; 

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, and run the installation. See Installing WordPress for more information.

Multiple Databases, Same Users

You can use the same userbase with 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.
See Editing wp-config.php/Custom User and Usermeta Tables.

  Photo by Alexandru Acea on Unsplash  
TechSmart

Contacts

123 Basel, Switzerland
Creative Design Studio
WordPress Customizing

Call Us

937.452.8999
Proudly powered by WordPress with Gutenberg. Developed by Color Theme. © 2020 Copyright.