Installing WordPress MU on a Dreamhost Server

Blandname is currently hosted with DreamHost, and we’ve been here for years. It’s cheap, offers lots of goodies, and one-click installs allow us to easily install and test web-based software. Not to mention that they also support Ruby on Rails, and give you SSH access and the ability to run a Jabber server as well as unlimited MySQL databases. If you are wanting to host your own website then choose a UKservers.

You’ve also probably gathered that blandname is currently running WordPress. Dreamhost Circulo Marketing has had a one-click install for WordPress just like ipage has for a while now, and since it was handy at the time, we went for it.

But things change, and one-click installs often are not enough to satisfy most webmasters, which is how we got where we are today. Since my goal with blandname is to create another multiuser blog similar to what has already been running for years at yottabite, but instead of having one big weblog, we’d like to have multiple subdomains like string.blandname.com, which WordPress MU allows you to accomplish, automatically.

Unfortunately DreamHost doesn’t support WordPress MU‘s subdomains by default yet (you can always send them an email), but we can still get away with subfolders, which is more than good enough for a test.

This guide will require familiarity with DreamHost’s control panel, as well as common Bash shell commands as we will be using SSH.

The first step is to make a test domain for you WordPress MU install. In my case, I navigated to the “Domains” section of the left-hand menu, then to the “Manage Domains” section of the DreamHost panel, and created the new subdomain test.blandname.com. You’ll want to make sure to select PHP5, and enable extra security. This typically takes about 10 minutes to complete, but we still have the database to add, so let’s get to that at the same time.

In the “goodies” section of the DreamHost control panel, select “Manage MySQL”. The default view is to set up a new MySQL database, which is what we’re going to do. Create a unique database name, the subdomain you would like it to use, as well as the data base username and password. Make sure to keep note of all of these settings as we will need them when installing WPMU.

DreamHost will have by now created a folder in your SSH root that will allow you to place files there and start some of the work while we wait for the subdomain to be created and propagate. Login to your server using SSH (you’ll need to use either your DreamHost hostname here or another web address for now – you can use the WordPress Mu domain later). Now we’ll navigate to the new subdirectory that was created when we setup the new subdomain by typing: cd test.blandname.com Change the folder name to whatever is pertinent in this case.

Now that we’re in the correct folder, we’ll grab the latest using the always-handy WGET. Here’s the code:

wget http://mu.wordpress.org/latest.tar.gz

gunzip latest.tar.gz

tar -xvf latest.tar

cd wordpressmu-1.0 (this will probably change, ls -al will tell you the dirname)

cp -rf * /home/YOURUSERNAME/test.yourdomain.com/

cd ..

rm -rf wordpressmu-1.0/

Now we’ve got a clean directory structure in the root of our test domain, and we’re set to go ahead with the WordPress MU installation.

By now the subdomain has probably propagated because DreamHost is getting faster and faster, so using your web browser, navigate to test.yourdomain.com

Next you’ll want to retrieve the soiled napkin, SubEthaEdit file or whatever else it was that you used to jot down the database settings, and plop them in here. They are very straightforward, and this is typically the most problematic so check them twice but have no fear: if you mess up WP MU will tell you, and you can retrieve the settings from the “Manage MySQL” section in the DreamHost web control panel.

The rest is quite simple: you’ll be met with a typical WordPress installation page, but instead it’s for WorPress MU. The first question that needs to be asked is whether or not WordPress MU users will be using subdomains or subfolders of the root WPMU installation. As previously stated, DreamHost currently does not support subdomains by default (I’ve put in a request, here’s hoping), so we’ll select subfolders here. WP MU will have already placed the domain name you will be using in the yellow textfield, but if you had decided to use subfolders instead of the webroot, you’ll want to specify that here as this will affect all links as well as your RSS feeds.

Lastly, we’ll want to name our multi-user WordPress MU blog, and specify the email address that you will use for things like spam reports, and replies to your comments on the parent blog.

Click on that small “submit” button, and let’s see what happens!

Hopefully on the next screen you’ll see this message:

Creating Database Config File: DONE
Congrats! Your WPMU site has been set up and you have been sent details of your login and password in an email.

Click on the link provided, and get with customization, as we’re all done.

Firefox 2 – Display Single Close Tab Button

Close Buttons on Tabs in Firefox 2.0

If you’re now using Firefox 2.0, you’ve probably already noticed that tabs now have close buttons by default, instead of having a single tab close button on the far right-hand side of the toolbar. If you preferred the older behaviour, simply navigate to the “about:config” page (type it in like a URL or webpage address), and find the section marked “browser.tabs.closebuttons”. Double-click on this entry, and set the value to 3 to display a single close button at the end of the tab strip (Firefox 1.x behavior).

Alternatively, you can set the value to 0 to display a close button on the active tab only, 1 to display close buttons on all tabs (Default), and set it to “2 to not display any close buttons at all.

taken from the about:config page at MozillaZine

A parting tip: To close the current tab using your keyboard, press CTRL+W. If you close a tab by mistake, just head to History > Recently Closed Tabs, and you can resume work from there (alternatively, you can use the arcane keyboard combo CTRL+SHIFT+T).

If you prefer using your mouse and want an even faster way about it – try the middle-mouse click (that’s typically a scroll button). When you click the scroll on any tab it instantly closes the tab for you. I have been using this method quite a bit lately. Though it seemed quite alien at first, I quickly got used to it and it’s now a major part of my Firefox 2 workflow.

Beyond Firefox 2 – Testing Minefield (Firefox 3)

OK, so everyone is very excited about Firefox 2. I’m excited, your excited, all the social networks are ablaze.

But development does not stop at whole numbers, and the testing must go on – which is how we got here.

So I’m testing Firefox 3 (Minefield). That’s right, I won’t be outdone. I must run the most unstable software. Well at least on the test boxes. So currently the Vista, Leopard, and Edgy boxes are running “firefox-3.0a1”.

The first things you will notice are the graphics – everything has a nice sheen to it (in fact, looks just like Firefox 2!), while remaining true to the normal Firefox UI. Also of note is the fact that favorites are now run using a SQLite3 database. For the full list of features, head on over to the Burning Edge page.

Firefox 3 Minefield Toolbar
Firefox 3.0a1 Toolbar
Firefox 3 Minefield Tabs
New Tabs in Firefox 3.0a1 Minefield

As far as I can tell this is just as stable as Bon Echo was (that’s right – was stable for me), with inline spell-checking and some other fancy goodies.That’s all for now, some more screenshots from other platforms (other than Windows XP of course) and crash reports as they happen

Note: of course this is somewhat tongue-in-cheek. I’m sorry for the Mozilla devs. We all need to stop worrying about the cutting edge and appreciate what we have – fantastic browsers! Opera, Safari, IE7 and Firefox are all great, really.

Run IE 6 and IE 7 at the same time

Now that Internet Explorer 7 has been released in its final form, a lot of people are rushing out to install it as soon as possible. However, some web designers will want to keep a working version of Internet Explorer 6 to make sure their designs for IE7 aren’t broken in IE6. Jon Galloway has a great tool to have both versions of Internet Explorer installed and working at the same time, using a launcher comprised of a batch file and some registry hacks.

I tested the hackish launcher, and had no problems whatsoever.

Another mention: very soon IE7 is going to be a forced (pushed) update, so it’s going to be installed without you noticing, and Microsoft is going to reboot your computer, regardless of what you have left open overnight. To prevent having Internet Explorer 7 from being installed in the fashion, you’ll need to download the IE7 blocking tool from Microsoft.

Finally, if you don’t pass the WGA check to download the blocking tool, SnapFiles is providing a mirror of the IntelliAdmin IE7 Blocking Tool.

Make Prototype.js TINY – Keep Compatibility

Prototype.js is a very popular AJAX framework used when building dynamic websites. You will find Prototype in most Ruby on Rails projects as it is included by default, and for good reason; Prototype.js is a great library that includes a lot of functionality.

Unfortunately it is rather large in size, weighing in at roughly 50KB.

Although many have managed to reduce the file size of Prototype by paring down the code and gzipping the file, we’re going to use an additional tool to approach the problem, one from the Mozilla foundation that appears to work very well – Rhino.

(Oh, in the interest of full disclosure, I am a Java fanboy, having studied at a university that got a lot of Sun funding back in the day. I hope you can see past that and check out this Javascipt hack, I really do.)

An informative quote from the Mozilla page for the Rhino project goes like this:

“Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users.”

Alright then, so what you have is a Java bytecode version of Javascript that will work in most browsers.

Sounds interesting, let’s see what we can do with Protoype.js!

I decided early on to use a Rhino tool that I found on the Dojo site that allows me to compile Javascript and make it Rhino compatible. The page give you a brief walkthrough and some examples on how to use the tool, so I won’t need to cover that here in detail.

So we compile our Prototype Javascript file, let’s see what our results are then, shall we?

Before: 47445

After Rhino: 32716

After Rhino and gzip: 9454

So it’s at about 9KB now!

In order to utilize the new file, upload it to the directory that houses your original Prototype javascript file, then any instances of prototype.js in your code to prototype.jgz (zipped javascript).

You’ll also want to change your .htaccess file so that you handle the new script properly by typing pico (or nano or vi or what-have you) .htaccess:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ".*Safari.*" [OR]
RewriteCond %{HTTP:Accept-Encoding} !gzip
RewriteRule (.*)\.jgz$ $1\.js [L]

AddType "text/javascript;charset=UTF-8" .jgz
AddEncoding gzip .jgz

You'll notice here that we're doing user agent detection for Safari. When I did my testing it seemed to be spotty, so what we're doing is falling back to javascript if we see that the user is using Safari. We're still compatible, and the code works everywhere else.

blandname whitepaper published on Silicon.com

Sometimes, I send articles from blogs or sites that I post to in order to have them published as white papers with business sites to see how well my content will fare. I typically don’t check up on them, and normally forget the logins shortly after submitting. However, I was just crawling through my Mint stats referer information, and noticed that one of the blandname articles got accepted to be published as a whitepaper at Silicon.com.

While this isn’t extremely exciting news, I was impressed nontheless that they didn’t edit the artcile at all – the whitepaper is wholly taken from my article on installing Ubuntu Edgy Eft Knot 3 on VMWare Server (if you haven’t read it yet check it out).

Alright back to work!

Allow Multiple Logins/Users for Mint Stats Tracker

I have been testing the Mint PHP web statistics script for my development sites lately, and though I love it and the modular plugins you can get for it, one feature is sorely lacking – multiple user logins.

This quick hack is by no means revolutionary, but it certainly does get the job done.

A new feature in Mint 1.2.x is to allow what’s called a “client mode” where anyone can access the statistics without the need to login. While this works for locally hosted Mint installations, the is definitely sub-optimal when it comes to a production site.

The solution? I’m sure you may have guessed it already, but by using .htaccess, you can easily set up multiple logins to Mint!

In my case I use subdomains like minttea.mytestsite.com. Using SSH, I logon to minttea.mytestsite.com, and issue this command:

pico .htaccess

In order to add user to the file, you must append the .htaccess file with lines similar to this htaccess guide.

You’ll need to encrypt the usernames and passwords, but once it’s done you will have logins enabled.

Please note that this method is susceptible to a brute-force attack, but it will keep most people from poking around with your stats.

Once I have figured out a better way (using PHP for example) I will post it here too.

blandname launches prefoc.us beta

We finally launched our online RSS reader today, and are looking for testers. The site is called prefoc.us

prefoc.us (prefocus) will eventually allows (!) for more interactivity (!!) but since it’s still in beta these functions aren’t available yet. You can also add feeds to be parsed, and view pictures, listen to audio, and even watch videos!

Stay tuned to blandname as the site develops.

Oh, and more tech tips coming soon!