Testing New WordPress Versions Part 1: XAMPP

This is Part 1 of a multi-part series of posts discussing how I test new major releases of WordPress before upgrading my “live” sites. This first step gets us rolling with the Apache / MySql / PHP stack.  Subsequent articles will discuss database copying, code copying and, finally, testing the actual upgrade and features. 

This series assumes you’re on a Windows machine. You Linux guys can do your own version of this.  :-)

Since 2.3 is coming fast, it seemed like a good time to get this series finally rolling — it has been languishing on my “things to write about someday” list entirely too long!

The Goal: Make an exact and fully functioning copy of our current blog and then try the upgrade.  Plugins and all. 

Warning: What appears below will need to be adapted a bit if you are running the Windows web server (IIS) on your local machine. Simplest option would be to turn it off or uninstall it. We can cover that later, in comments, if there’s really a need — I’d guess that most people running IIS are doing so intentionally and can handle disabling.

Let’s get rolling then, shall we?

First, we need to make our Windows machine look like a server.  Since most (including mine) WordPress blogs are hosted on the Apache, MySql, PHP stack, we’ll just install those. XAMPP is an easy way to get that all rolling, so head over to their download page.

There are two “flavors” of XAMPP: a full version and a Lite version. While Lite appears to have everything a person would need, this article with go with the Full version since it features an installer that keeps this all simple (shortcut to that download area).  You see it circled red below .

XAMPP Installer Link

Click that installer link and download it to your computer — somewhere that you can find, of course.

Once downloaded, run the installer.  You’ll have a few screens to click through, then you’ll be asked where you want to install XAMPP.  The default is c:\xampp:

XAMPP Install Location

If you only have one drive, this is a no-brainer.  For the purposes of this article, I’ll assume you went with the default, but you can put it wherever you’d like.

Next we have some XAMPP options to check out:

XAMPP options

I unchecked the XAMPP desktop icon (I’m not a big fan of desktop icons!).  I’d also advise against checking any of the options under SERVICE SECTION unless you need your XAMPP environment up and ready to go 24×7.

The installer will spin for a bit.  When it is done, it’ll ask if you’d like to run the XAMPP Control Panel.  Choose no — we have one more step to take care of.

Pretty Permalinks

If you run default permalinks, you can safely skip this section

I don’t know about you, but I use “pretty Permalinks” on my blogs and I want my test blog to do the same. Otherwise, it’s not really a complete test, is it? XAMPP isn’t configured for that by default, but we can fix that rather quickly.

Locate the c:\xampp\apache\conf directory.  In there is a file named httpd.conf and we’re going to edit it.

Odds are good that if you double-click that file Windows will ask you what you want to use to open it.  Go with Notepad or your favorite text editor (and no, Word is not a text editor!). Search for rewrite_module.  For the version I’m using, that’s on line 118 and looks like:

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the “#” from the beginning of the line — the # comments the line, but we don’t want it commented. So now you have this, right?

LoadModule rewrite_module modules/mod_rewrite.so

With the version of XAMPP that I’m playing with, that’s sufficient. However, sometimes I’ve also had to look for “AllowOverride” and make sure it is set to “All” for the htdocs directory (this is the default now, apparently).

Start XAMPP

Starting it all up is pretty easy. Look under your Start -> All Programs for the new “Apache Friends” folder.

XAMPP on the Start menu

But first, notice one other thing while we are here.  See the XAMPP httpdoc folder option? Remember that — we’ll be using it later when we copy the existing blog over.

Select the XAMPP Control Panel and then click the Start button by Apache and MySql.

XAMPP Control Panel

I’ve circled them above.  You’ll see they turn to “Stop” once clicked. Click the “X” in the upper right and it’ll disappear to the tray.

Done!

A Quick Note about PHP versions
XAMMP will give you PHP5.  Not all hosts are at PHP5 quite yet.  If your host is still on PHP4, you may want to consider doing your testing of the new environment at 4 as well.  Point your browser to http://localhost/xampp/phpswitch.php to learn how to switch back and forth.

Next step we’ll be doing some database copying.  Onwards to Part 2

Possibly Related posts:

  1. Testing New WordPress Versions Part 3: The Files
  2. Testing New WordPress Versions Part 2: Data
  3. Testing New WordPress Versions Part 4: Upgrade!
  4. Short Detour with the Testing New WordPress Series – Database Issue
  5. WordPress: Fixing Bad Feeds

About Chris

I consider myself a jack-of-all-trades. Which means I know a little about a lot... or think I do, at any rate. Check my "About Me" page for more info.
Tagged , , , , , . Bookmark the permalink.