Hosting two wordpress sites on one server

Multisite feature

If you want multiple blogs using WordPress, use multisite feature to create what was referred to as a network of sites. This feature was implemented by merging WordPressMU into the core at Version 3.0.

Multisite feature install single WordPress and database.

Multiple Blogs Through Multiple Installs

By some reason, if you need multiple WordPress instances, you must actually install each WordPress separately (that is, as a separate WordPress installation). System architecture can be divided into two types by number of databases.

Hosting two wordpress sites on one server Multiple Blogs
  1. Multiple databases installation. Each database manages specific site's information.
  2. Single database installation. The database manages all site's information.

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:

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.

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:

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:

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.

Other Resources

  • Scripts for a WordPress Weblog Farm and Musings on a Multiblog WordPress are historical documents to review about creating and managing multiple blog through a single interface.

Related articles

Hosting multiple sites drupalThere are many reasons why a systems administrator or developer may choose to host multiple sites on the same server in a multisite configuration. For example, such a configuration could:...
Get database prefix wordpress hosting21st September 2013 If you are using WordPress multisite then depending on what blog you are using the database table prefix will be different. By default the WordPress database table prefix is...
Change theme uri wordpress hostingChanging The Site URL On the Settings->General screen in a single site installation of WordPress, there are two fields named "WordPress Address (URL)" and "Site Address (URL)". They are...
Free wordpress hosting australia flagWordPress powers 26.4% of all websites on the Internet. Being so popular, it attracts a lot of attention. Not all of that attention is good. The negative attention that WordPress gets often...
Hosting wordpress on amazon s3 clientThe following procedures will help you install, configure, and secure a WordPress blog on your Amazon Linux instance. This tutorial is a good introduction to using Amazon EC2 in that you have...