Movable Type and WordPress on XAMPP

| | Comments (10)

Both Movable Type and WordPress are powerful, flexible blogging engines. Both are available in downloadable, install-it-yourself versions that can be uploaded to typical web hosting accounts that support Apache, MySQL, PHP and Perl. But, if you want to play with these tools locally, there’s a great package call XAMPP - “…an easy to install Apache distribution containing MySQL, PHP and Perl.”

Once XAMPP is installed, your test bed is ready for applications like WordPress and Movable Type. Since it’s on your own Windows box, you can play around with configuration, templates, styles, and so on. I’m using it on Windows XP and used the instructions that follow to set everything up.

Installing XAMPP

The XAMPP packages are pretty big (about 100MB for the combination I chose), but downloading is the slowest part. After that, they’ll be up and running in a few minutes with these steps:

  1. Start at the XAMPP for Windows project page and download XAMPP for Windows (basic package) and the Perl add-on
  2. Install XAMPP, choosing default options and location c:\xampp
  3. Install Perl add-on, choosing default options
  4. Run the XAMPP Control Panel and start both Apache and MySQL
  5. Read the XAMPP instructions for changing the MySQL root password

At this point you should have a working installation of Apache with MySQL, PHP, and Perl. You can choose to run Apache and MySQL as Windows services, but I prefer to start and stop them through the XAMPP control panel. I’m only using this for testing, so I don’t need them to be running full time.

Installing WordPress

Now that we have our base system, getting WordPress running locally is pretty straightforward. I used these steps to install WP 2.2.1:

  1. Visit the WordPress download page and download WP in Zip format
  2. Extract the files to c:\xampp\htdocs, making sure to use the folder names inside the Zip file (if done correctly, you should have a file `c:\xampp\htdocs\wordpress\index.php`)
  3. Open the local phpMyAdmin page and login using updated root password you set earlier
  4. Select Databases and create a database named `wordpress` with encoding `utf8_unicode_ci`
  5. Select Privileges tab and create a user `wordpress` and password of your choice, allowing all privileges for the `wordpress` database
  6. With a text editor, open file `c:\xampp\htdocs\wordpress\wp-config-sample.php`; edit the file to set DB_NAME to `wordpress`, DB_USER to `wordpress`, and DB_PASSWORD you chose above; save the file in the same location but named `wp-config.php`
  7. Finally, open the local WordPress install page and follow the steps to complete the setup

(Credit to Tamba 2 for the WordPress steps.)

Installing Movable Type

Now we’ll install Movable Type and see how it compares to WP. I used these steps to install the new MT 4 Beta 3:

  1. Visit the Movable Type 4 page and download the latest beta in Zip format
  2. Extract the files to `c:\xampp\cgi-bin`, making sure to use the folder names inside the zip; then, rename the default folder (like “MT-4.0-beta…”) to just “mt4” (if done correctly, you should have a file `c:\xampp\cgi-bin\mt4\mt.cgi`)
  3. From the location `c:\xampp\cgi-bin\mt4`, move the entire `mt-static` folder to `c:\xampp\htdocs`
  4. Open the local phpMyAdmin page and login using updated root password you set earlier
  5. Select Databases and create a database named `movabletype` with encoding `utf8_unicode_ci`
  6. Select Privileges tab and create a user `movabletype` and password of your choice, allowing all privileges for the `movabletype` database
  7. In the folder `c:\xampp\cgi-bin\mt4`, edit all the *.cgi files and change the first line to: `#!c:\xampp\perl\bin\perl.exe`
  8. Finally, open up the local Movable Type install page and follow the steps to complete the setup

(Credit to the etc. blog for the .cgi file editing tip)

Conclusion

Not including download time, setting everything up should take about an hour. Then, you’ll have your own test bed for trying out both blogging tools, experimenting with styles, and trying out new releases.

Possibly related posts:

10 Comments

It appears that the MT install is no longer accurate. It seems that the connection for MySQL is not what is needed, and I can not find a way to resolve that without hours of unnecessary effort.

Also, you need to install the perl module or you never get it installed.

And to think I complained about WP.

Mark, thanks for the comment and I'm sorry you weren't able to get Movable Type working using these instructions. The steps should still be valid with the latest v4.x of MT. Also, I did mention in step #1 under XAMPP Setup that the Perl module is required.

when I give the Static web path then the error occurs what can I do for running Movable type
I flow the instruction that given in the site

Error: 'http://localhost/mt-static' could not be found. Please move your static files to the directory first or correct the setting if it is incorrect.


I have the same error here:
Error: 'http://localhost/mt-static' could not be found. Please move your static files to the directory first or correct the setting if it is incorrect.

Regarding the issue with MovableType reporting it couldn't find the "mt-static" location, I recently saw the same thing with a new XAMPP install. I finally did get it working, but I don't recall how. I'll do some further testing to narrow it down.

Brian,
Any development on the "mt-static could not be found" error? I just followed the instructions above and it all worked until I got to step 8 - here I'm stuck... If I try just a simple http://localhost/mt-static/, then I get "mt-static - OK" (which is in mt-static/index.html), so all seems OK, so what is wrong? The Apache log complains a bit (see below). Thanks for an otherwise great post. - Erlend

[Thu Sep 11 22:08:15 2008] [error] [client 127.0.0.1] script not found or unable to stat: D:/opt/xampp/cgi-bin/mt/css, referer: http://localhost/cgi-bin/mt/mt-wizard.cgi
[Thu Sep 11 22:08:15 2008] [error] [client 127.0.0.1] script not found or unable to stat: D:/opt/xampp/cgi-bin/mt/css, referer: http://localhost/cgi-bin/mt/mt-wizard.cgi
[Thu Sep 11 22:08:15 2008] [error] [client 127.0.0.1] script not found or unable to stat: D:/opt/xampp/cgi-bin/mt/js, referer: http://localhost/cgi-bin/mt/mt-wizard.cgi
[Thu Sep 11 22:08:15 2008] [error] [client 127.0.0.1] script not found or unable to stat: D:/opt/xampp/cgi-bin/mt/js, referer: http://localhost/cgi-bin/mt/mt-wizard.cgi
[Thu Sep 11 22:08:15 2008] [error] [client 127.0.0.1] script not found or unable to stat: D:/opt/xampp/cgi-bin/mt/mt.js, referer: http://localhost/cgi-bin/mt/mt-wizard.cgi

It has long been looking for this information, Thank you for your work.

I'd just like to thank you for taking the time to create this internet website. It has been extremely helpful

Has this been solved yet:

Got an error: DBI object version 1.607 does not match $DBI::VERSION 1.604

Good information to me.

About

This is the personal website of Brian Cantoni. All opinions on this site are my own.

Twitter

Delicious Links

This weblog is licensed under a Creative Commons License.

Tweetfave

Coming soon - a new way to get the most out of your Twitter Favorites: Tweetfave.com

Mobile Websites

Visit cantoni.mobi for a helpful list of mobile sites.

Advertising

Archives

For older entries, please refer to the Archives.