Categories
Technology

Setting Up WordPress Mu On A Shared Hosting Account

Recently, I started working on a social networking website exclusively for Dipsites. Personally, I’d have never done so but Rach kept on pestering me to do it ever since “school’s out” because he believes that this is a neat idea. (Quite a lot of other people chipped in and said it was worth doing too.) I’ve finally given up ‘fighting’ against it and decided to go ahead.

dipsiteme2

The site is titled ‘Dipsite Me’ and will be up soon at dipsiteme.com. We intend this to be more as a database for alumni. For this project, I evaluated quite a lot of platforms for building the social network on. Here’s a quick summary of the main ones:

  1. Elgg: Elgg is a software intended to build a social network from scratch. It’s plugin support is non-existent right now. Moreover, it doesn’t seem to have a large community; the developers kept people waiting for months on end saying ‘Elgg 1.0 will be releasing this summer’ (as if it was some blockbuster movie). The irony is that Elgg beta – version 0.92 (called Elgg Classic) and earlier had extensive documentation and plugin set, none of which has been ported to the final release version. Till now, development doesn’t seem forthcoming on porting old plugins. That’s where having a small community hurts. Elgg may become a viable option in the future, but as of now it isn’t.
  2. Drupal: Dear ol’ Drupal with a few modules thrown in can double up as a social networking site, but the fact is that it doesn’t feel like a social networking site. You’ll need to do some serious chopping of code; that can become more daunting since Drupal plugins are generally incompatible with future main branch releases. (Like 6.x plugins won’t be compatible with 7.x, although that’s because they’ll be using more of PHP’s new OOP principles.)
  3. PeopleAggregator: Are you fuckin’ kidding me? This thing looks straight out of 90s ‘HTML coding horror’ books.
  4. A few Joomla mods for creating social networks: Out of these, only Anahita looks promising – and it’s vaporware. Rest pretty much suck.
  5. KickApps: Pukes out error messages faster than snow falling in Alaska. You sit down, edit something, hit save, and poof – you get an error message and everything’s lost.
  6. Paid-hosted solutions: For anyone with deep pockets, this is the way to go. Among these, SocialGo is sensibly priced (compared to other offerings) and gives you a lot out of the package. The other viable option is Ning, but they’re highway robbers who charge for each ‘premium feature’ separately.

So what’s the solution I’m finally going in for? BuddyPress. It’s an extension of WordPress (running on WordPress Mu – WordPress Multi-User Edition) which allows you to turn a Mu installation into a social network. (You can check out its demo at testbp.org) BuddyPress makes sense because it will probably have a much ‘stricter’ release schedule than other options I mentioned above.

To begin with, you first need to set up WordPress Mu on yor hosting. Get it from here and follow the installation instructions. And then install BuddyPress.

It’s the ‘installing WPMU’ bit which went wrong for me. When I tried to start the installation process, I got this error:

Warning: constant() [function.constant]: Couldn’t find constant VHOST in /path/to/your/wpmu/install/folder/wpmu-settings.php pn line 34.

No WPMU site defined on this host. If you are the owner of this site, please check Debugging WPMU for further assistance.

Debugging information wasn’t of much use in this case. Checked the file in question, and couldn’t find anything amiss. Searched up WP-MU forums, and it turns out that a lot of people were having the same problem. Most of them were using shared hosting. I’ll get to the solution first, and then talk about my experience.

The problem is this – most of the people who faced this problem already have a WordPress installed in the root of their account. What they’re trying to do is alias the domain they want to use to a particular folder in their hosting account. For instance, I had aliased dipsiteme.com to /somefolder in my account. This is where you encounter the error. If you want to install WP-MU in the root of some domain, then it wants the path to be ‘/’ (and not ‘/somefolder’) in the server configuration. Because of this it throws up the “Couldn’t find constant VHOST” error.

A lot people on the forums keep suggesting users to edit Apache configuration files (which most shared hosts do not allow) or set up a wildcard DNS entry (again, which many hosts don’t allow and / or is a pain in the ass). Here’s the easier solution:

  1. Choose a time of the day when your main blog (the one in the root folder of your account) gets least visitors.
  2. Rename your wp-config.php file (in the root folder) to anything else, say, wp-config-changed.php. (Any other name will do.)
  3. Now open up the install.php file on the domain of the WP-MU install you want to setup in a web browser. You’ll find that it is no longer giving that error.
  4. After setting up, rename the wp-config.php file in the root folder back to its original name.

Problem solved. Actually, the wp-config.php messes things up because it also has effects on subdirectories. Note that this happens only with WordPress Mu, not while installing a normal WordPress blog in a subfolder.

What really pissed me off was the attitude of most people trying to ‘help’ others on the WP-MU forum. One of the most best things about open source is the community around that software. For chrissake don’t fuck that up! There’s no need to be a whiny bitch if people ask for help, because you can always STFU. Sure, a lot of people were nice enough and stuck around to help users solve the problem, but quite a few of them kept bitching about how bad shared hosting is and how super ossum they are because they have dedicated hosting. These folks go on and on about how “You’re trying to con users by starting a blogging service on cheap hosting” blah blah. What if it’s just a bunch of people who’ve pooled in money for hosting so that they can run personal blogs?

In short, stop bitching instead of helping people. If being a part of the open source community and helping others is not your cup of tea, then don’t snarl at users and give WordPress a bad name.

22 replies on “Setting Up WordPress Mu On A Shared Hosting Account”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.