Tuesday, May 22, 2012

Dealing With Multi-Site In WordPress 3.0 Forward

When I received the news that WordPress was upgrading to 3.0, I was ready to start preparing to upgrade my Blogs. I wanted to take a look see at what was involved in the new upgrade and to start getting my Plug-In list ready, and so on.

As I looked into the new upgrade I found where “Multi-Site” was now a part of the upgrade or what WordPress calls WPMU allowing you to run multiple Blogs from a single installation of WordPress. Oh man, not good! I have always felt that Multi-Site was a security risk of the highest order. I have a ton of Blogs out there in the Blogosphere and you have to find them to knock them down. I’ve got them pretty well scattered. But with Multi-Site, if you get hacked, someone can take the whole thing down.

Sorry, I got a little carried away with that one. Multi-Site is available with WordPress 3.0 and forward, but is disabled by default, so you have to activate it to get it to work. If you don’t want to activate it you can just install one Blog per WordPress Installation. It takes some hard coding to get it to work, which is very good, so that you don’t activate it by mistake. Because if you do activate it by mistake, you can’t go back and de-activate it. So you have to be right on.

So let’s take a look at what is involved. To activate WPMU you will need to add this code to your “wp-config.php” file in your home directory or root file:

define(‘WP_ALLOW_MULTISITE’, true);

You will want to add this line of code to your “wp-config.php” file at the very beginning of the file like this:

<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don’t have to use the web site, you can just copy this file
* to “wp-config.php” and fill in the values.
*
* @package WordPress
*/

define(‘WP_ALLOW_MULTISITE’, true);

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */

You can add this code after you install WordPress if you like or before installation, it does not really matter …… One note of caution though, do not activate any plug-ins until you are finished setting up your Multi-Sites Network.

Once you have added this code you will need to go to your WordPress Dashboard > Tools > Nework, which then brings you to the “Create a Network of WordPress Sites” screen. Select your desired options then select “Install” and remember that this process is irreversible.

Your next screen will be the “Enabling the Network”. You will need to make some additional changes to you “.htaccess” and “wp-config.php” files. Once you are finished, just save your changes and log-off and then log back in and you will now see a new menu bar for “Super Admin”. This new menu will let you add sites and configure.

If you get into trouble with various plug-ins after you have enabled your network, you can reverse the process of installation, but why bother, you would just have to remove the Blogs that you installed under WPMU. It is really much easier to start over with a fresh install or forgo the use of the offending plug-in.

For those of you that are wondering why the line of code to activate the WPMU is not already written in your wp-config.php file like you sometimes see with other bits of code. Someone can and undoubtedly will mistakenly enable (True) the multi site option which will make changes in whole WordPress installation. So to avoid accidental “enabled multi site” option, WordPress team haven’t included it in your “wp-config.php” file.

I would like to offer a very special thanks to Imran Yousaf for his assistance in helping me to define the finer points of installing “WPMU”. You will find many helpful tips and tricks over at his very fine Blog. I highly recommend it.

Comments

  1. Well, I didn’t know about this feature of WPMU – using single WP installation for multiple blogs. Glad I came to know about this now. But at the same time, I do agree with the risk which WPMU has and I think it makes perfect sense to have multiple WP installations which I have already been doing though unintentionally.

    • Jeffrey says:

      Hi Maninder,
      Over 3 months ago you arrived at my Blog “Blogging Extreme.com” and left comments regarding Multi-Site WordPress. In keeping with my habit of answering my readers comments …… here I am.

      I would like to thank you for your visit and hope to see you back here soon. I’m afraid that I have not had as much time to devote to my project here as I would have liked. However, come the first of the year I am going to try to improve things around here.

      I’ve taken most of this year trying to prepair for an upcoming site launch that will tie back into “Blogging Extreme.com”. The site is “Jeffrey-Morgan.com”. My home base for the past three years has been “Bloggers Market.com”.

      I apoligize for the tardy reply and look forward to seeing you agian here and over at “Hacktik.com”. Again thank you for your visit !

  2. Valencia says:

    Well, I didn’t know about this feature of WPMU – using single WP installation for multiple blogs. Glad I came to know about this now. But at the same time, I do agree with the risk which WPMU has and I think it makes perfect sense to have multiple WP installations which I have already been doing though unintentionally.

    • Jeffrey says:

      Hi Valencia,
      Hackers look for the most prominent target. I think that is why “Facebook” and “Windows” are faviorites. With the widespread use of “WordPress” more and more problems are occuring with hackers. Most of this is done by kids. So if you take some common sense approaches you will have few problems. Spreading WordPress installs over different servers, with different usernames and passwords with a good .htaccess file to accompany your installs and you should reduce your problems by about 90 percent.

Speak Your Mind

*

CommentLuv badge