Right! There was a reason for the previous post — beyond showing off my m@d bnny-drwng skillz.
HTML and CSS files are plain text. You can create them in Notepad, save them to your hard drive and open them in your browser. So you can mock up a complete working HTML web site on any machine that’ll write text and run a browser. Which, these days, is pretty much any appliance up to and including an electric nosehair clipper.
A WordPress blog, though, is assembled on the fly by php scripts. To build a working WordPress site, at a minimum you have to run the Apache server, a MySQL database and the PHP interpreter — plus a text editor and browser, of course. So while we’re in draft mode, we have three choices:
1. Build the site in place on the host, right where it’s going to live, in front of God and everybody. I wouldn’t mind doing it this way — I’m clearly not capable of shame — but I’d be afraid to experiment too rigorously with the php for fear of blowing something up.
2. Build the site in place on the host, but in a scratch directory separate from the final location. This has the advantage that it’s not up front at your URL and you can experiment before making it go live, but someone could still stumble over it. Including Google. Yes, there are ways to tell Google to ignore directories, but it doesn’t always work. And once something gets into Google, it seems to be there for life. That means a lifetime of “not found” errors in your error log. Also, with 1) and 2) you have to be online to edit.
3. Build the site on your own machine — but to do that, you’ve got to run the server and database and stuff on your machine. You don’t have to run under Linux. There are Windows (and Mac) versions of Apache/MySQL/PHP, though setting them up is no fun.
Here’s where XAMPP comes in. XAMPP is an auto-installer dealie (like Fantastico, but geekier). It stands for: X-Apache-MySQL-PHP-Perl. The X signifies multiple operating sytems (as opposed to LAMP and WAMP).
Perl isn’t essential for our purposes, so we can use the Lite version of XAMPP (which is described as the “Take-Run-Delete-Forget-it” package. Does that sound good to you? You bet it does, Homer!)
You’ll find a nice, simple overview tutorial here. I followed these instructions, accepted all the defaults, fired it up, and did it run? No, of course not! The Apache server refused to launch. Per the instructions, I made sure IIS wasn’t loaded (that’s the server software that comes bundled with Windows XP Pro. It’s not loaded by default). Hm.
Ports 80 and 443 were reserved by some other program. Hm. 80 is the HTTP port and 443 is the HTTPS port. Who was hogging it? Skype was! Moreover, it doesn’t actually need those ports, it just reserves them as backup. Go to Skype >> Options >> Connections and unclick “Use port 80 and 443 as alternatives for incoming connections” and — yes! All is well.
Incidentally, does anybody know who’s putting out these photos of smartass, wormy-looking young people shot from above against a white background? Seems like half the sites on the web are using them. They sho’ am creepy.
Okay! That’s XAMPP done, now let’s get WordPress going. Download the latest WordPress version and unzip it into its own folder on \xampp\htdocs (wherever you let xampp install itself — it defaults to \Program Files). Total size of all this junk on disk is around 120 megs.
Okay, one last step. In your \wordpress directory, you’ll find a file called wp-config-sample.php. We need to edit that. Any text editor will do. This is what the default setup for localhost should look like:
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost');
Save the file as wp-config.php (drop the word ‘sample’). Now when you point your browser to http://localhost/wordpress/, you should see:

My blog! Well, okay — your blog.
The whole point of XAMPP is to set up a local sandbox. But is this as now a real, web-accessible server? Yes, apparently it is, if you’re connected directly to the ‘net. That’s why MySQL gives you scary warnings about changing the password from blank. Weaselnet connects through a router, which seems to be enough of a cut-out. So, ye’r on yer own with that one!