Installing WordPress MU on a CPanel/WHM Server

I was encountering some difficulties installing WordPress MU 1.0 using different subdomains, and I finally figured it out after some time, so I thought I’d do a walkthough to help fellow MU-wannabes. :)

I think its important, first to understand that different web hosts use different admin control panel systems, and mine is using CPanel/WHM. I have a reseller account, so I have access to the WHM console.

//

To triple confirm, your webhost admin should look something similiar to this:

CPanel

and your WHM, if you are a reseller, should look like this:

WHM

Actually, on a second thought – it may not, because this is one of the skins… but just make sure you are using CPanel/WHM if you want to follow through with this walkthrough.

What are we going to achieve here?

At the end of the whole thing, you will install WordPress MU 1.0 on your server, using a different subdomain for each blog. So for example, if your domain is bloggingiscool.com, then you will be able to quickly create blogs like http://firstblog.bloggingiscool.com, http://secondblog.bloggingiscool.com… and so on.

In this installation, you will also be installing it in the root directory of your server (i.e. public_html), so http://bloggingiscool.com will be your main MU blog. You can choose to install it in a subdirectory, such that http://bloggingiscool.com/blogs as your main MU blog, but again I will cover only the first one. Go figure (duh, just dump the code one level deeper!), if you want to install it in a subdirectory.

Note that WordPress MU also offers another alternative, that is to install each blog in a different subdirectory. I will not be covering that here.

Lets get started.

Step 1. Download WordPress MU and extract the files

The first step, is of course for you to head down to the WordPress MU download page, and grab a copy of the source code. It should be a zip or tar.gz file. Doesn’t matter.

Unzip the file. You will get a directory like this:

WordPress MU Unzipped

Step 2. Upload Those Files!

Now, WordPress freaks out there, DON’T be tempted to go and edit the wp-config-sample.php! What you need to do now is to just upload the whole thing into your webserver!

So, the files in your public_html folder in your web server will look like this (treat the wordpressmu-1.0 folder like your public_html folder)

Remote Directory

Step 3. Change File Permissions

Head on to your domain. i.e open your browser and head on to http://www.{your-domain}.com

You may get this message, or a few different others. Just follow the instructions and to the CHMOD to your files.

Also make sure that you have Apache’s mod_rewrite module enabled for your server. If you have been using WordPress on your server with custom permalinks, then you are fine. If you are unsure, do check with your server admin.

Change Permissions

When you are done with the permissions setting, you should get this.

Enter WPMU Blog Details

Hold on a minute, don’t enter the details first.

Step 4. Set up your mySQL database

Now its time to log on to your CPanel and create your mySQL database and user. For this example, lets say your mySQL username is blogcool_user, password is bloggingisverycool and database name is blogcool_wpmu.

Step 5. Enter the details

Select “subdomains” in the Blog Addresses section, enter your mySQL credentials into the page, and the details of your main blog.

Use subdomains

Hit submit and you will grin like me :mrgreen: seeing that you are done!

WPMU Installation Done

Your login credentials are sent to the email address specified.

Don’t be too happy yet. You are only halfway done!

Yeah. The show has just begun. WordPress MU is installed, fair enough, but configuration for your subdomains will NOT work! You can go ahead and create the blogs, but you WON’T be able to access your blogs using the subdomains like http://firstblog.bloggingiscool.com

So, next, you need to configure your server!

For those who do not have reseller accounts, you might just need to ring your server admin up to get this part done for you. For those with reseller accounts, you still need to contact your server admin. The only time you do not need to contact your server admin is when you have the rights to access your server’s httpd.conf file.

Well. I didn’t. That’s why I was stuck~! :D

Step 6: Configure your wildcard DNS and sub domains (sounds geeky)

Update: If you have CPanel X3, you DO NOT have to configure the DNS zones or make changes the http.conf file. All you have to do is to create a subdomain, called “*”.

Yes, a subdomain with an astericks.

I’ll do some screenshots when I do find the time to do so! Meanwhile, pardon me! :)

Read more about this step at this comment.

If you read the readme, it recommends you to Matt’s blog where he explains how to do so. But to me, it didn’t really help, because he was giving me a bunch of code – I had a graphical web interface for my reseller admin console.

Anyway, here’s what you need to do.

Log in to your WHM account. On the left, find and click “Edit DNS Zone”.

Edit DNS Zone

Your accounts appear on the right. Select the domain you use for your WPMU installation, and click “Edit”

You will see a bunch of text boxes and a bunch of numbers!

Whoa! What is this? To be frank, I don’t know much either, but what I know is that messing with these number is no fun (because I’ve messed up with them before, and caused some trouble for the server admin :mrgreen: )… but I know what to do now.

You will see something like this. (erm.. minus the red arrows. Those are my drawings. Nice? :) )

Add DNS Zone Entry

Create a new entry after “Add New Entries Below this Line”.

You should specify * for domain, 14400 for TTL (default value), A for record type, and your server IP address. To find out what IP you should type, refer to the record with your domain above.

Click save.

Go ahead and retrieve the same page again (i.e. Edit DNS Zone -> Select Your Account). You should see the new entry there.

New DNS Entry

If that is the case, you are done with WHM. *phew* :mrgreen:

BUT you are not totally done yet!

Step 7: Erm… part 2 of step 6? I promise this is the last part!

You need to add something to your httpd.conf file.

I personally do not have the opportunity to do so, so I had to mail my friendly server admin to do it.

Here is what you need to add:

<VirtualHost {SERVER_IP_ADDRESS}>

DocumentRoot /home/{CPANEL_USERNAME}/public_html

BytesLog domlogs/{YOUR_DOMAIN}-bytes_log

User {CPANEL_USERNAME}

Group {CPANEL_USERNAME}

ServerAlias {YOUR_DOMAIN} *.{YOUR_DOMAIN}

ServerName www.{YOUR_DOMAIN}

CustomLog domlogs/{YOUR_DOMAIN} combined

</VirtualHost>

Where:

  • {SERVER_IP_ADDRESS} is your server IP address
  • {CPANEL_USERNAME} is your CPanel username. Normally this should be eight characters or less. This is the username you use to log into your CPanel console for your account
  • {YOUR_DOMAIN} refers to your domain, e.g. bloggingiscool.com

So, giving an example, where my IP is 123.456.789.123, CPanel username is blogcool and domain is bloggingiscool.com, the code is like this:

<VirtualHost 123.456.789.123>

DocumentRoot /home/blogcool/public_html

BytesLog domlogs/bloggingiscool.com-bytes_log

User blogcool

Group blogcool

ServerAlias bloggingiscool.com *.bloggingiscool.com

ServerName http://www.bloggingiscool.com

CustomLog domlogs/bloggingiscool.com combined

</VirtualHost>

Again, you (or your server admin) need to add this to your httpd.conf file, and according to Matt, this entry must come after any valid subdomain VirtualHost entries you may have. So if you already have another subdomain on that same account, then make sure this entry come after the subdomain’s entry.

Then you are really finally done!

You can login now and start whipping out blogs. Remember your password is sent to the email address you specified.

So.. installing WordPress MU is not as easy as the walk in the park right? At least not for me! But just imagine what you could do when you know you can create blogs on the fly, on your own domain! ;)

Give me more time to fiddle with WPMU, and I’ll tell you more. :mrgreen:

Oh… If anyone with access to a httpd.conf could provide details on the part to add the VirtualHost record, then it’ll be wonderful!

Explore posts in the same categories: install, Tips

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s


%d blogger menyukai ini: