Installing Movable Type locally on Windows XP

Advertisement


This has been updated for Movable Type 3.2. See entry "How to Install Movable Type on Windows XP".

I just set up a local install of Movable Type. I had previously done so using phpdev. I think I fluked my way into making it work. I'm unix challenged ;) After a recent computer format, I tried to install phpdev again and, for some reason, I just couldn't get it to work.

I stumbled on EasyPHP yesterday though and decided to use it to give a local MT install another go. It was so easy, I thought I'd take a minute to write up some basic instructions while it was still fresh in my mind. I can't guarantee results on your machine, but these steps worked for me on Windows XP, SP1. All the steps are listed in the Extended Entry.

As a side note, if you're interested in just setting up a local server on WinXP to learn and test php, EasyPHP is a dead simple and painless way to do it!

My main focus though was to set up a local testing install of Movable Type, so these instructions are with that goal in mind. If you have interests beyond just running MT locally, have a look at phpdev, XAMPP (as suggested by Achim) or Aprelium's Abyss Web Server X1 (as suggested by Nicholas) for more comprehensive options.

The end result of these install instructions is a local MT install using a Berkeley or mysql Database, with a user-friendly interface.

If you notice anything unclear or missing from the instructions, let me know and I'll add or clarify.

Before I start, here are the links to the resources used in this, if you need them for reference:

EasyPHP Program
EasyPHP Installation Instructions
ActiveState ActivePerl Download Site
Movable Type Download Page
MovableType Installation Instructions

Download, Extract and Install a Couple of Files

1. Download EasyPHP 1.7 AND the Local Pages in English file listed below the main program download.

2. Install EasyPHP by clicking on the exe file you just downloaded. Note: Be sure to close down any open programs before installing to ensure proper installation. Accept the defaults, which will install the program into your Program Files group. (Note, even though EasyPHP's installation instruction suggest changing the default install location to outside the Program Files directory, I did not and all seems fine. If you're planning on doing more that running a local MT install, it might be worth investigating the pros and cons of each location prior to installing though).

3. After successful installation, chose not to run the program immediately (uncheck the box) and close the install program.

4. Click on the Local Pages in English file you downloaded (a zip file). When winzip asks where to unzip to, browse to the directory EasyPHP just created (C:\Program Files\EasyPHP1-7). Highlight the "EasyPHP1-7" folder and unzip. You should get an overwrite dialog box. Click "Yes to All". All done with this part. The local pages will be in English now, instead of French.

Configure and Test our Install of EasyPHP

5. In WinXP, click Start > All Programs > and find the EasyPHP listing in your program listings. Select EasyPHP (last listing).

6. Configure EasyPHP. Click the Apache button and select "Start". Click the MySql button and select "Start". Both should change to green and indicate "Started". In the middle section, click the box "Launch server when this application starts" (to have this process happen automatically when starting EasyPHP. In the Language dropbox, chose English. Click Apply and minimize. It will minimize to the taskbar and show a flashing red dot to indicate the server is running. Leave the service running.

7. This would be a good time to make sure everything is running correctly. From the WinXP Start Menu > All Programs > EasyPHP and select the first option "Accueil EasyPHP" ("Home EasyPHP"). Your browser will open and you should see the EasyPHP Home Page. Take a minute to have a look around and make sure nothing looks wonky. If all the pages come up properly, you're good to go on to the next step. (NOTE: you could stop here if you're only interested in setting up a local server for testing PHP, btw).

Installing Perl

8. At this point, we're missing one thing necessary for running Movable Type. Perl. Go ahead and download ActivePerl. I downloaded the Windows MSI for ActivePerl 5.6.1.

9. Install ActivePerl, accepting all the install defaults (installs to C:\Perl). All done with Perl Install.

Installing Movable Type
(Note: there are a lot of possible configuration options available here. These are the ones I used. If you are comfortable making other choices, go for it!)

10. Download Movable Type (Full Install with Libraries) and unpack it to your EasyPHP cgi-bin directory (C:\Program Files\EasyPHP 1-7\cgi-bin).

11. From Windows Explorer (Right-click Start button and chose Explore), navigate to the Program Files/EasyPHP 1-7/www directory. Double click this directory to enter it. From the top File menu, chose New"and then Folder. Name the new folder mt.

12. Using Windows Explorer, move the following files from Program Files/EasyPHP 1-7/cgi-bin TO Program Files/EasyPHP 1-7/www/mt (the folder you just created):
1. the docs folder,
2. the images folder,
3. index.html file
4. styles.css file.

You should have two folders and two files in EasyPHP 1-7/www/mt when you are done. Screen capture. The cgi-bin folder should look like this when you're done - [Screen capture of file setup in cgi-bin]

13. Configure Movable Type to your local settings. Go in to EasyPHP1-7/cgi-bin folder. Open up mt.cfg file with your text editor and make the following changes

FOR BERKELEY DATABASE OPTION . . .

CGIPath http://127.0.0.1/cgi-bin/
DataSource c:/program files/easyphp1-7/www/mt/db

Uncomment (remove the #) on the StaticWebPath line. Change it to read > StaticWebPath /mt/


FOR MYSQL OPTION . . .

CGIPath http://127.0.0.1/cgi-bin/
Under the Datasource line, add the following lines
ObjectDriver DBI::mysql
Database test
DBUser root
Uncomment (remove the #) on the StaticWebPath line. Change it to read > StaticWebPath /mt/

Save and close mt.cfg.


14. Set the path to perl in all the cgi files. Open up each of the cgi files in the cgi-bin directory in your text editor and change the first line to read > #!C:\Perl\bin\perl.exe Save and close each file after making this change.

If you will be using mysql for archiving, open up mt-db-pass and remove all text from the file. Save and close. (Note here: these are the dead-easy instructions, using the default install parameters. You many want to set up a new database and/or password etc. If you know how to do that and want to do it now, adjust accordingly).

15. Just about there. We need to set up a few folders. First, if you're using Berkeley, we need to create the database directory we pointed to in the mt.cfg file. (Not necessary for mysql option). Navigate to the C:\Program Files\EasyPHP 1-7\www\mt folder. Once in the folder, chose File>New>Folder and name the new folder db

Also, for either the Berkeley or mysql install , let's create a folder to hold your first weblog while we're in here. Create another folder in the www/mt directory and name it first_weblog. Enter this new folder and create another folder inside and name it archives

16. Before we can run mt-check, we need to install one or more Perl modules -

For Berkeley Database, we need to install only DBI:File. Here are the instructions to do that > WinXP Start > Run > type cmd and click OK. At the prompt, type PPM then hit Enter. When the PPM prompt appears, type Install DB_File then hit Enter. Module should install. Quit PPM program (type quit then hit enter). Close the DOS box.

For mysql install, we only need to install DBI and DBD-mysql. Follow the instructions above but at the PPM prompt, type install DBI and when that is complete, type install DBD-mysql

17. We are ready to run mt-check. Make sure EasyPHP is still running (Should see the "e" in the taskbar and it should be flashing the red dot). Open up your browser and enter the following url > http://127.0.0.1/cgi-bin/mt-check.cgi
If all has gone well, you should get a good report. Make sure it's reporting that the modules we just installed are found. (DBI::File for Berkeley or DBD::mysql for mysql install)

18. If all looked good there, go ahead and run mt-load. In your browser, enter > http://127.0.0.1/cgi-bin/mt-load.cgi
and you should get an "all went well" report.

19. Point your browser to http://127.0.0.1/cgi-bin/mt.cgi to enter Movable Type. Remember the default Username is Melody and password is Nelson.

20. Configure your First Weblog. Enter First Weblog and chose "Weblog Config". Here are my config settings >

Local Site Path > c:/program files/easyphp1-7/www/mt/first_weblog
Local Site Url > http://127.0.0.1/mt/first_weblog/
Local Archive Path > C:\program files\easyphp1-7\www\mt\first_weblog\archives

Archive Url > http://127.0.0.1/mt/first_weblog/archives/

Save and Rebuild All.

ENJOY!

**SECURITY NOTE:
I may be unix challenged but I know enough to know that this set-up should never be setup to be accessible to the outside world, as it uses program defaults and no password for the database, at the very least. If you want to run a web accessible server, use other programs/options. This setup is only for a testing server for local, personal use.

February 1, 2004 in

Search etc.

More Entries From