How to run multiple WordPress Blogs on a single MySQL database?

By doctorjay8

Some hosting companies limit the number of MySQL databases allowed. So it is usefull to use a single MySQL database for many blogs. One solution is to use WordPressMU (multiuser). Problem it is not on fantastico and you have to install it manually – I have done it – it is trivial if you are used to FTP, cresting MySQL databases etc.

However, I am not using my WPMU for multiple blogs as it is not one hundred percent compatible with all the themes and plugins.

So back to running multiple WP blogs on a single MySQL database:

  1. Create your first WP blog (either through fantastico or manually).
  2. Download the wp-config.php file from the blog directory.
  3. Change the line: // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix  = ‘wpag2_’;   // Only numbers, letters, and underscores please!
    the $table_prefix is changed say from wpag1_ to wpag2_ as in above case.
  4. Copy the files of the WP blog to the new directory.
    say from /public_html/domain1 to /public_html/domain2
  5. Now upload the new edited wp-config.php (I find it easiest to use wordpad for editing this file) to the new directory (/public_html/domain2 in the above example).
  6. Point your browser to the directory: http://www.domain2.com and it will lead you through the rest of the installation process (very easy).

There is another previous version of this post on another one of my blogs. Very soon I’ll make a video of this operation since I suppose a video is worth one thousand and one words. I’ll let you know where to see that video once it is ready.

Tags: ,

Leave a Reply