HowTo – Hosting Multiple Websites With WordPress 3.0

Filed under: Industry News

wordpress-logoThe new version of WordPress 3.x is a merger of WordPress MU and the standard single site WordPress.org that many of us are use to using to host single websites or blogs… boy i kinda hate that word blog…

On first install you won’t notice any difference well no dramatic changes have been made to the interface but hidden inside your distribution are some powerful features for hosting multiple websites from a single install of files and a single database.

The first thing you have to decide is can a single install of WordPress provide the power you need for many sites. For the most part the answer is yes but depending on your hosting features you may end up better off deploying single sites on individual accounts.

Remember that each new site will be making calls to a single database. Some hosting companies may throttle your memory and interaction with your database. This could mean that one active site could make all the others lag unnecessarily.

SubDomains or /SubDirectory Hosting
The next thing you need to decide is how will your multisite install function in the way of domain urls.

Like problems with permalinks were for some of us in the early days the ability to allow wildcard domains on your website hosting account could be a problem for some users.

And while  we are talking about it to host www.yoursite.com/username accounts your Permalink structure must be functional meaning modrewright must be working on your server and you will need to replace some information in your .htaccess file in the root of your account.

I strongly suggest for testing reasons that you practice with subdirectory hosting first so you can learn user management and account creation then reinstall if you want to use subdomains.

Before Setup

Before we begin you should have setup your WP3.0 database, uploaded the files to your ROOT directory which is usually public_html or if you have a directory for your domain put it in the main directory and not into a sub-directory  /public_html/here and not  /public_html/wordpress/

Your site must also run on port 80 or 443 and it must be on a Domain not on an IP address.. if you are installing locally edit your host file and Apache vhosts conf file to setup a domain or use localhost.

Your WordPress install should be functioning as a single site.

Getting Started with WordPress 3.0 MultiSite Functionality

To enable SuperAdmin or Multiwebsite features you must add a few lines of instructions to your wp-config.php file.

Add the following line to your wp-config.php file near the top where you see other definitions.

[php]define(‘WP_ALLOW_MULTISITE’, true);[/php]

You will now need to log off and back in and you should see a new menu option in your Tools area called Network.

You will have the option to select subdomain or subdirectory hosting.

Select the option that you want then logout and login again as admin.

Fill in the options for your server and network and if you are hosting accounts for other then yourself you need to get notification when events occur so make the admin email one that you will check often.

You can now select install and WordPress will be configured for MultiSite Hosting.

If you have chosen to use subdomains and have not configured your WildCard Domain DNS Setting correctly you may get an error message.

You must now add a directory in your wp-content directory called blogs.dir to store content from your various WordPress installs.

Update your .htaccess and wp-config.php files with the code provided in your network setup. This information will be available on your Tools / Network Page as long as you don’t make changes to your install.

It is important to completely replace the content of your .htaccess file with the network page settings and do not append or add them to the top of your .htaccess file. If you have special .htaccess instructions that are part of other functions of your site you will need to edit them back in after you have verified your WordPress install is functioning correctly.

Adding Sites and Users

You can now log in as admin and begin making new sites.

Each site needs to have a user and email associated with the site.

Although you can add users to your main site it is not necessary that they are members of the main site to have administration or user rights on subdomain or subdirectory sites.

WordPress will reuse plugins and themes from your main directory for all your sites. A Database setting will allow or disallow plugins and themes hosted in your main wp-content/theme or plugins directories for each subsite. The SuperAdmin controls that setting.

It is probably a good idea to turn on notifications if you allow members to join your main site.

Automation of blog creation allowing users to create their own blogs is up to you.

In other howtos we will cover management of a WP3.0 multisite install. For now you can browse the options you have and do some testing of your own.

If you are not familiar with the user level hierarchy in WordPress it is a good idea to review this before you start opening up your site for others.

REMEMBER MAKE BACKUPS