MT+MySQL·PHP: 01 (Introduction)
Over the next few weeks I’ll be moving my Movable Type weblog from an Australian Web hosting service in Australia to one in the USA. My esteemed compatriot, Allan Moult, and I intend to document the process as thoroughly as we can. I’ll be writing from the perspective of a Windows desktop user while Allan will cover the Macintosh OS X issues.
Our hope is that these posts will be useful not just to other MT users in a similar situation, but to anyone interested in getting MT to run on an Apache/MySQL/PHP system.
Disclaimer: We’re not claiming to be experts, just reasonably savvy Movable Type users with a few runs on the board. In the (likely) event that either of us makes an error, we’re confident that more experienced souls will jump into our comments and point out where we’ve run off the track. When that happens, we’ll acknowledge the mistake in a comment and correct the actual post.
My site is currently hosted on a Win2K/IIS 5.0 server. Though I cannot fault the service, which has been responsive and competent, the installation was not straightforward and I only later discovered I could have MySQL database support by moving up to a US$150 per month hosting plan. I asked for alternatives before settling on Cornerhost, with whom I’ve been absolutely delighted. Other hosting services came just as highly recommended so you shouldn’t have any trouble finding one that suits. As long as you follow Recommendation #01:
Under no circumstances should you willingly pay for anything but hosting on a UNIX/Linux Web server.
Many of the problems that I and others encountered in installing and using Movable Type are a consequence of running the software on an IIS server. In those situations where you must install on IIS, an approachable, flexible Systems Administrator is highly desirable.
Your hosting plan should also include MySQL and PHP support, for reasons that I’ll make clear as this series continues. If you are installing Movable Type from scratch, this may not seem so important—but I promise you it will pay dividends quite quickly. If you are migrating an MT system that’s been using Berkeley DB as the database, you’ll find that MySQL makes life a lot easier.
I won’t cover installing MT in detail because the installation notes are thorough and easy to follow. The only glitch I encountered was in following the recommendation to:
Upload these files/folders in ASCII mode: docs, lib, mt.cfg, styles.css, tmpl, and all of the CGI scripts (mt.cgi, etc.).
Upload these files/folders in Binary mode: images.
When I did this, I found that the Linux server modified the files uploaded in ASCII mode. I compared an uploaded file with its original and, apart from some additional blank lines, they were identical. I checked with the tech support people at FTP Voyager (my FTP client) and they advised me to use Binary tranfers for everything. Why is this important? Because FTP Voyager’s powerful synchronization feature is rendered useless if the file sizes change during the transfer. (Other Windows FTP clients, such as WS-FTP Pro and Cute FTP Pro also synchronize.) And, when you’re installing MT or phpMyAdmin, file synchronization makes it easy to check that all the necessary files are in place.
Once I’d sorted out the file transfer issue, I was able to install Movable Type on a UNIX server in less than an hour, and I’m the kind of person who reads and follows the instructions religiously. Of course. you’ll need to ask your hosting provider to set up a MySQL database ahead of time. I asked Michal Wallace at Cornerhost to set up both of the MySQL databases that are included in my US$200 per annum hosting plan. I’m using one as a test database to iron out the wrinkles in the export/import process and I’ll use the other as the actual weblog database.
In the next installment I’ll cover installing phpMyAdmin, a browser-based administration interface for MySQL databases. For security reasons, it’s prudent to use .htaccess to password protect the phpMyAdmin interface and, coincidentally, Dorothea Salo today explained .htaccess in one of her typically thorough, easy-to-follow technical posts. Dorothea didn’t deal with password protecting a page or directory with .htaccess and I don’t want to cut across what she’s got planned. But, between the two of us, we should be able to cover it thoroughly. Why is it important? Because you don’t want strangers fussing with your MySQL backend.
Once we’ve secured the phpMyAdmin installation, I’ll show how phpMyAdmin can enable you to reinstall Movable Type in a matter of minutes, thereby enabling you to more quickly debug the process of importing your existing posts.
Update.
The problem mentioned by Burningbird in the comments—about the version of MySQL that your hosting service is running—seems to be specific to Movable Type’s Latest Comments feature and is covered in this thread on the Movable Type Support Forum. If you’re not using this feature to display your last n comments, then you probably don’t need to worry about it, though I’ll be checking this with Michal at Cornerhost.
And, I’m pleased to announce that Allan Moult has posted his first entry, so we’re well and truly up and running.
Allan suggests hosting your blog “one level [or folder] down from your public html path, ie, www.yourdomain.com/blog/ so that we can keep installation easy.”
The alternative to that is to set up a subdomain so that your weblog address is weblog.yourdomain.com (mine is weblog.delacour.net). The advantage of doing it this way is that you can take advantage of Google’s free search, which I’m currently using. However, if you intend to use Jay Allen’s MT Search (which will be integrated into the next release of Movable Type), then either style of blog URL will work well.

Go ahead and talk about password-protection via .htaccess; I had no plans to.
Sent you email, but I'm still not sure my mail is getting to you.
Posted by: Dorothea Salo on 27 September 2002 at 11:10 PM