« Favicon and Gravatar in MT4 | Main | Add Scrollbars to Image Popup Windows in Movable Type 4 »

Install Movable Type 4 in Yahoo! Small Business

While it seems that the Yahoo! Small Business web hosting packages continue to offer Movable Type as an option, and there has been some talk about Yahoo! not supporting MT4, while Six Apart doesn't really seem to support MT4 at Yahoo!

Nice, huh? So what are you to do? Or more specifically, what am I to do when I have clients clamoring for MT4 and they are on the Small Business package? I have to figure out a way to make it work. Unfortunately, neither Six Apart nor Yahoo! makes it easy. The good news is that it's quite possible, once you know what you need. The first suggestion that I have - don't read that long letter that you'll get from Yahoo!, as it won't help tell you what you need to know.

You will need to get a copy of MT4. Go on, I'll wait. Got it? Good. Now go get an FTP program too. If you don't have one, try WinSCP because it works really well. Got it? Good. Now just one more thing - you need to be able to unpack your distribution. I like WinRAR here, but WinZIP or something should work too. Got it too? Good. Now you're ready to proceed.

First, unpack MT4 to someplace you can find it. You can put it wherever you like, so long as you'll be able to find it again. When you do, you'll get a directory named something like MT-4.01-en. You need to rename this directory to whatever the name is where you currently have MT installed on your small business account. That is, where you log into MT - chances are this is probably going to be blog-mt. If you don't have MT installed already, you'll need to do it first, because I have not been able to get this to work without first having Yahoo! work some magic behind the scenes (I don't know what it is, either).

Now you need to log into your account at Yahoo! to perform a few tasks. Go to the Web Hosting Control Panel and select Create & Update, then select MySQL Database. We need to do two things here - first set up an administrator password, then install phpMyAdmin.

The first step is to assign a password. Select Database Administrator, then a user from the drop-down list. This drop-down is probably just one name, but if there is more than one, make sure you remember the one you select as you'll need it later. Then assign a password to the user. Make sure you assign a good password. If you need help, try the random string generator. I generally create 16-character passwords with numbers, uppercase and lowercase letters. But that's me. You can make it whatever you like.

Once you save your password, select Install Admin Tool. You need to agree to the license agreement. Then create a new directory, and click Install phpMyAdmin next to that directory. Very soon thereafter you are presented with a screen that gives you a link to your newly installed copy of phpMyAdmin - make sure you save this link so you can get to it, because you'll need it.

In fact, you need it right now. Open phpMyAdmin in Internet Explorer. Though the standard phpMyAdmin works fine in Firefox and other browsers, the Small Business version does not, so you must open it in Internet Explorer. Don't forget or you'll be left wondering why it's not working. Trust me on this one.

Once you do, you need to select your existing Movable Type database from the drop-down in the left column. By default, this is mt. I don't think that there is any way to change this name, but if there is, you'll know it, so you need to select the name you changed it to instead.

After the database loads, select the Operations tab and locate the Copy Database To section towards the bottom of the page. Enter the name of the new database (we're copying here, so that we don't make a mess of our existing database). It doesn't really matter what you call the new database, but you'll probably want to make it meaningful. For our example, let's go with mt4. The default should be to have Structure and data and CREATE DATABASE before copying selected. If not, select them now. Then click Go.

Now you have a brand-spanking new copy of your database to play with.

Load up WinSCP - or whatever FTP program you have chosen - and connect to your FTP account. The first thing you want to do is rename the existing blog directory (by default, blog-mt) to something else. Again, it doesn't matter what you name it, but make it meaningful. Let's go with blog-mt3 for now. Then upload the contents of your new MT4 installation that you saved earlier to that location. When it's done, you should have two MT directories - blog-mt (the new one) and blog-mt3 (the old one).

The reason we named the new one blog-mt is twofold. First, Yahoo! seems to have some sort of hardcoded action going on in the background whereby if you name your new installation blog-mt4, it doesn't work right. Second, by putting things into the same directory where they were to begin with, you don't have to rebuild anything right away - they just work. That's why we had to rename the old directory, too - to get it out of the way.

Now we're almost done. You need to copy the mt-config.cgi file from blog-mt3 to blog-mt. But you'll want t make a few changes to it first. In the default Small Business installation, the CGIPath directive is commented out. You need to add it back in, otherwise it won't work right. So do so now:

CGIPath http://www.example.com/blog-mt/

The section in bold (blog-mt) is the part that you'll set to the value of your own installation path, if it varies from blog-mt.

Next up, you need to change a few variables. Scroll down until you see the database connection section. You'll want to update the Database, DBUser and DBPassword directives:

Database mt4
DBUser foo
DBPassword sRJSn4H1Fo7U0ZF7

Again, you will need to replace the values in bold with your own - the Database name with the value you used when you copied the database using phpMyAdmin and the DBUser and DBPassword with the username and password that were set up during the add administrator section of this tutorial.

Once you've made those changes and put the mt-config.cgi file into the new mt-blog directory, you are just about ready to go. Make sure that at least the mt.cgi and mt-upgrade.cgi files are set to executable (755), and connect to mt.cgi to start the upgrade process. You will also want to make sure that any other scripts you want to use are executable (mt-comments.cgi, mt-tb.cgi, etc). But you don't need to do that until after the upgrade completes.

This tutorial is written by LMT author Chad Everett of Everitz Consulting.
Tutorial cross posted on Don't Back Down and LMT.

Comments (19)

david:

This is not for the fainthearted. After a couple of tries I did manage to get it working. A few gotchas:

- Permissions matter. Check and double-check that the default permissions are what you want. Yahoo can be very unforgiving in this regard.

- You have to take any references to the Yahoo plugins out of your templates or they won't build. You can try to add the Yahoo stuff back in if you really need it, but you probably don't.

But all in all it's worth it. I too am a bit miffed that Yahoo didn't step up to the plate and make all this seamless. I doubt that too many people would choose MT3 over MT4 - at least anyone doing any serious template customization.

Hi David -

Thanks for your notes!

I would definitely agree that this operation is not for the faint-of-heart, but it's really not the bad either. Thanks for pointing out the Yahoo! plugins, I typically remove them so I hadn't noticed that they would cause a problem!

Thanks for creating this tutorial (and shame on Yahoo! and Movable Type for Advertising tight MT integration and then not updating the software)

For what it's worth here is my experience with the process:

- Being a Mac user I was not able to access the SB PHP admin tool. Since I was setting up a new account this did not matter to me for now but could be a problem for others. Are there other compatible Browsers or can one upgrade the PHP admin tool?

- In the mt-config.cgi I had to replace these lines in order to make the MT control panel to work:

In the original file:
AdminScript mt.fcgi
CommentScript mt-comments.fcgi
TrackbackScript mt-tb.fcgi
SearchScript mt-search.fcgi

In my (now working) file:
AdminScript mt.cgi
CommentScript mt-comments.cgi
TrackbackScript mt-tb.cgi
SearchScript mt-search.cgi

@Philip -

Thanks for your note!

I don't use a Mac, so the information is helpful. Unfortunately, I'm not sure about phpMyAdmin. I would suspect it would work on IE (as that's how it works under Windows), but it may not. You might find that installing your own copy of phpMyAdmin would work, but I've found that Yahoo! does some odd things behind the scenes that might prevent it from working entirely. I wish I could be more help in this regard.

As to mt-config.cgi, you are right - having the old values would prevent those from working. You should also be able to remove these values entirely, as they are the default (so it isn't necessary to specify them).

In any case, I'm glad that you're up and running!

Alejandro Vitola:

I am having trouble with this procedure, it seems like everything is fine but when i login i get this message:

"Our apologies, but you do not have permission to access any blogs within this installation."

Do i need to do something on the database fields to get it to work fine. I have access to the databases using phpMyAdmin.

Thanks for your help


Man, great write up, but I think I hit a wall. After the install, I viewed my blog and it's all text. Did I do something wrong or I have to grab a template from somewhere?

Thanks!

@Alejandro -

If you are getting that message, it sounds like the user doesn't have authority to any blogs - that is an MT permissions issue, not a database one. If you were having database problems, MT wouldn't be working at all!

@Nam -
I'm not sure of the problem, exactly - your blog looks fine now (though it looks like you are running Yahoo! MT 3.2). My guess would be that it's a stylesheet issue.

Thanks for the response!

@ Chad: I reverted everything back to MT 3.2 after my failed attempt.

I'm going to test it out on another Yahoo business account so I can iron out any misunderstandings of the install.

I read a comment in regards to removing "any references to Yahoo! Plug-ins". I am assuming I have to go into my MT 3.2 plugins control panel and deactivate them that way?

Please throw out any input. I'm very computer savy but damn, never done any database-like stuff before until now.

Like always, thanks for the help! Nam P.

@Nan -

You can deactivate your plugins that way, or you can simply remove them from the "plugins" directory. Entirely your choice.

Thanks for these instructions. I ran into one issue that hasn't been brought up yet though.

After copying over the new MT 4.1 files and opening the MT CGI script in my browser (IE 7), I was presented with the upgrade page. I started the upgrade process, but the little square progress panel was never updated during the process. It finished without error and without doing anything (though I didn't realize that nothing was upgraded at first). After selecting the continue button, I was right back where I started at the upgrade page.

I checked the schema version in the DB (hosted on the required version of MySQL -- 4.1.14) and it still said 3.2. I changed users thinking that the account I was using didn't have the necessary rights. I switched to the yroot user which had all the power in the world. This didn't make any difference either.

After browsing through mt-upgrade.cgi and Upgrader.pm for a while, I viewed the HTML that they were sending back. There was a bunch of JavaScript there about the things that needed to be upgraded. I had a thought, "Perhaps this JavaScript is incompatible with Internet Explorer." I open the mt-upgrade.cgi script in FireFox 3 beta (cause that's what I have installed ATM), and to my utter surprise, it started upgrading!

After that, I was able to use it in IE, but with intermittent problems. It seems to work best in FF.

Gene:

After reading this, I regained hope of upgrading from y!sb mt 3.2 to 4.1.

The only things that threw me were that, 1) the phpmyadmin uses main.php instead of index.php. So make that a redirection.

2) Also, I had to login as an administrator and grant the crippled "blog-mt" database user with alter, create, etc. privileges.

Then upgrading was a snap and no "AdminScript mt.cgi" type statements were necessary, either btw.

Arelav:

Travis, the same here about using FF. Thanks a lot for the hint! I've finally upgraded!!

Chad, your manual was just perfect! I made it, but my site was also all text. I picked up a theme, but had an error during rebuild

"One or more errors were found in this template.
* <MTYSearch> at line 55 is unrecognized.
* <MTHostedByYahoo> at line 61 is unrecognized.
* <MTYahooStats> at line 68 is unrecognized.
"
Is that Yahoo! plugin issue? Should I just kill the new version (it's 4.2 btw) and start from the scratch (removing all yahoo plugins first)?
Thanks!

Hi Arelav -

Glad that it worked for you - the errors you are seeing are related to the Yahoo plugins, and those will come up anytime you upgrade an installation. I should have mentioned them in the upgrade guide, but didn't because I have also upgraded clients who don't use those plugins, meaning they aren't there in some cases!

What you will need to do is that each time you see those messages, simply locate the tags (MTYSearch, MTHostedByYahoo and MTYahooStats) and delete them. Because you have upgraded, but not installed the Yahoo plugins, you won't have them, and so that's why you are getting the error.

You can also try installing the Yahoo plugins from the original MT installation that you renamed early in the upgrade process - but they may not work in MT4. I haven't tried. Hope this helps!

Hi Chad!

It looks like copying *old* Yahoo plugins to MT4 plugin directory helps. At least I don' t need to edit templates anymore. They don't appear on installed plugin list either. But I still have one problem. My blog have plain text layout regardless of what I make it to look like. I can see blog colors change, but not the page layout. It's still *plain text*. "Main index" template looks exactly the same.
Stylesheet template contains valid information:
@import url(*my_domain*/blog-mt/mt-static/themes-base/blog.css);
@import url(*my_domain*/blog-mt/mt-static/support/themes/cityscape-la/cityscape-la.css);


I cannot fugure out what is wrong. I suspect this is the same problem as Nam P had. Do you have any ideas about that?
Thanks!

@Arelav -

If you want the Yahoo plugins you can definitely copy them over. They have taken to adding an image on text areas anyway, so I don't like to do so - but it's up to you!

As to the stylesheets - make sure that you have files in those locations. You can do this by re-running StyleCatcher (it looks like you are using MT styles) or by copying from your old mt-static location, since you saved it (you did save it, right?).

Thanks for quick reply!

Yes, I do have files in those locations. I didn't quite catch you - what do you mean by 're-running'? I have Style Catcher in both old and new locations. Directories are not identical. What exactly should I copy?
Sorry for such a silly quiestions, but I'm kinda lost :)

Hi Arelav -

Not sure why I didn't catch your reply earlier, but what I mean is that if you re-run StyleCatcher, you should get updated styles. You can also simply copy over the static files, if you find that faster. Hope this helps!

Joe D.:

I frequently get this error.

Got an error: Connection error: Can't connect to MySQL server on 'mysql' (13) at lib/MT/ObjectDriver/Driver/DBD/mysql.pm line 49
at lib/MT/ObjectDriver/Driver/DBD/mysql.pm line 49


It usually happens upon rebuilds, refresh, or just doing any admin tasks.

Post a comment

(If you haven't left a comment here before, your comment may need to be approved before will appear on the entry. Thanks for waiting.)