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”

You are a champion. Your solution for installing WPMU on a shared host fixed the issues I’ve been having, and you’re right – the WPMU forums were no help.

Thanks a million!

Cheers,

Mike

Ugh, as it turns out the point you made about wp-config.php messing t”hings up because it also has effects on subdirectories” did me in. I don’t have access to resolve the vhost settings which apparently need to be made.

I managed to get the installation going but it would fall over as soon as I tried to create another blog such as blog2.wpmuinstallaion.com. It kept throwing errors that indicate the server can’t be found.

I think I needed a higher subscription with hostgator to gain access to what I need to change – sound right? Anyway regardless thanks for the help, your post was the most insightful one I’ve seen so far and by far the most pleasant.

Cheers,

Mike

@Mike: You need a virtual dedicated / dedicated hosting to change those permissions. Sometimes with shared hosts you can send in a request to the customer care department detailing the changes you want (the one involving wildcard DNS entries / editing Apache configuration files). I don’t know whether HostGator allows that.

Do you need to keep blog creation open for everyone? If that is not the case (i.e., you’re just want to create a few blogs which you’ve already planned out beforehand), then you can rename the wp-config.php in root folder, setup the blogs you want in WP-MU, and then rename the file in root folder. That should solve the problem.

For both of you: I think you need to turn off all MU in your subdirectories to make it work. I currently have six MU running on one shared server ( with Hostgator ).

I had to get help for the last 4, so maybe I am not sure about the whole directive. But my shared host is a testament that it can work with multiple MU’s on a shared server.

6 MU installs in one account on a shared hosting server? I’m curious, because I heard that MU places more ‘stress’ on the server in using up CPU time – something which shared hosts limit. How much traffic do you get combined to all the MU sites? And which version of MU are you running – RC1?

I think it is stable still. 3 MUs are for testing themes and plugins interactions, and the other are actual websites. Combined, the MU’s get about 400 people per day.

I am consolidating the MU’s into two using the multi-site plugin when I switch to dedicated.

Just to clarify, the error message you get when another WP install lives in the same account doesn’t have anything to do with needing to do the Apache edits. That’s just for setting up the wildcard subdomains. And yes, many hosts will do that for you.

Sure, you can run a closed WPMU system on a shared host. As long as it remains small. I;ve been kicked off shared, there is a limit to how much you can do, and WPMU is way more resource intensive than the same number of single WP installs.

Often though, we do see a number of people in the forums looking to start a money maker on a $5/month host.

@Andrea_R: Right. That’s what I said – the other WordPress install is the problem, setting up a wildcard DNS entry is a solution – but one which needs edits many people may not be able to do.

I do understand that many people set up WPMU to make a quick buck, but that’s not necessary. People can have genuine reasons to set up WPMU on a shared host keeping everything on a small scale. Some of the ‘attacking’ of people who were asking questions on WPMU forum was quite unwarranted, especially when they had given no indication that they were running a get-rich-quick scheme.

Thanks very much for talking about such a simple solution to the problem! I’ve been getting errors for hours trying to do a WPMU installation on a new site and your trick made installation effortless.

Thanks!

I think, we can install WPMU on any web hosting, even on a free ones.

My website run on a shared hosting & i do not modify Apache Configuration
I just create * subdomain, then install WPMU

A lot of hosting providers don’t allow you to set up wildcard DNS entries. Mine does, but this method is admittedly easier and works across all hosts.

Great post! I’ve been looking for this evaluation of network options for months!

So, I can’t get past
“There doesn’t seem to be a wp-config.php file. I need this before we can get started.”

When I try to create, the page just refreshes. I’ve had my host take a look and they tell me they are set up so that I don’t need to be (can’t?) set to 777 and that I need to manually create the wp-config.php.

“We run SuPHP which operates under your accounts userid on the server. This elimiates the need for any 777 or world writeable permissions. If these permissions are set at that, it will throw that internal server error. You will need to follow the documentation on creating that wp-config.php manually.”

If I set to 777, I get 500 errors.

I’m installing to the root domain. Nothing else installed (i.e. WordPress). I have a wildcard subdomain set up.

I’ve tried your solution. No success. Any idea what I’m missing??

Cheers, of all the info I read yours made the most sense and made the least judgements. I’ve now go WPMU installed on the root of my directory with BuddyPress and BBPress running too. Your help made the whole process a lot less painful.

Leave a Reply

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