Sharing a Single Database

By Joe Gardiner Thursday, 3rd March 2011

All vClusters come with a single MySQL database. This can sometimes cause problems when you attempt to install multiple instances of WordPress on a single vCluster account.

This guide shows you how to avoid database clashes with a very simple step in the WordPress installation process. If you do not know how to install WordPress please follow the guide, ‘Installing WordPress on your vCluster‘.


Getting Started

Download the latest version of WordPress from http://wordpress.org, and extract it to a folder on your desktop.

Wordpress download page

Now you need to follow the usual WordPress installation steps. Open the WordPress folder you extracted on your desktop and copy the wp-config.sample.php file to wp-config.php.

wp-config.php file copy

The next step involves editing the wp-config.php file you just created.

Editing the wp-config.php

Open the wp-config.php with your favourite text editor. If you are using Windows I would suggest downloading a php file editor such as Scite as Windows editors add line breaks which will corrupt the php file.

Once the file is open take a look at its contents…

wp-config.php file contents

You can enter the vCluster database information as usual, but before saving and closing the file scroll down a bit further and find the line…

$table_prefix = ‘wp_’;

This prefix will be added to the front of any WordPress tables in your MySQL database. This is what you need to change to ensure there are no clashes between tables using the same name.

Change this prefix to anything that suites your particular project. For example my website is joegardiner.co.uk, so I will change my prefix to:

$table_prefix = ‘jgwp_’;


When your table prefix is chosen save the file and close it. You can continue to install WordPress in the usual manner, following this guide: ‘Setting up WordPress on your vCluster


Posted in Guides, Wordpress | No Comments » twitter-follow facebook-follow rss-follow

Leave a Reply

Your email address will not be published. Required fields are marked *