Setting Up Movable Type 4 on a MAMP Server

Recently my hosting provider, Blacknight Solutions, requested that bloggers using WordPress use the WP-Cache plugin to reduce the load on their servers. Michele at Blacknight has been somewhat critical of WordPress in the past, mainly due to it’s inefficient SQL and the resultant high number of database queries required to generate even a simple page. Based on this Michele moved over to Movable Type 4, and despite a few teething problems, he seems to be quiet happy with it.

As part of their control panel, Blacknight provide the handy Installatron Script Installer, however, there is no installer available for MT, so users have to manually install it themselves. Unfortunately my upload connection is so bad, that it me takes hours to upload the approximately 20 MB of MT install files. As I use MAMP for local site development, I’d thought I’d have a go at a local install of MT.

Because of where MAMP is installed, it’s not a straightforward process, there are a couple of “gotchas” along the way. So for those of you interested in performing a local install of MT4, here’s a quick HOWTO.

Before you start, you’ll obviously need MAMP Server, and MT4. You can grab MAMP here, and MT4 here.

Part I: Getting Ready To Install Movable Type

  1. Once you have downloaded the MT4 ZIP file, extract the files to a folder of your choice.
  2. Within this folder, you should now have an MTOS-4.1-en folder.
  3. Open this folder and locate the mt-static folder.
  4. Move the mt-static folder to /Applications/MAMP/htdocs/
  5. Open a new Finder window and browse to /Applications/MAMP/cgi-bin/
  6. Create a new folder, and name it mt
  7. Move the remaining files in the MTOS-4.1-en folder to /Applications/MAMP/cgi-bin/mt/

Part II: Create a SQLite Database

Before starting the Movable Type installer, you need to create a database in which to store your blog settings, posts etc. While the MT developers recommend that you use MySQL for your database, an additional Perl Module is required otherwise MT will not recognise your MySQL server. However, as this will be a local install, SQLite should be more than enough for your needs. (If you really need it, the required module is DBD::mysql which can be found here, but be warned installing it is problematic and time consuming).

  1. Start the MAMP application and click the “Open Start Page” button, or alternatively, type http://localhost:8888/MAMP/ into your address bar.
  2. Click the link for the SQLiteManager at the top of the page.
  3. Type in the name of your database, and select Version 3.
  4. The full path to the database file also needs to be provided. In this example, I’ve called my database mt4, but you’re free to call it whatever you wish.
  5. Note that the path to your database will be /Applications/MAMP/db/sqlite/[your database name].db
  6. Click the Save button, and your database will be created.

Part III: Installing Movable Type

Now that you have all the MT4 files in place, and your database has been created, you’re ready to start the Movable Type web-based installer.

  1. Open your browser, and type in the following address: http://localhost:8888/cgi-bin/mt/mt.cgi
  2. The installer will tell you that the mt-static has either been renamed or moved and will request both the Static Web Path and Static File Path to the folder. Enter the following paths:
    • http://localhost:8888/mt-static
    • /Applications/MAMP/htdocs/mt-static
  3. Click the Begin button and the installer will confirm that the paths you have entered are correct.
  4. The next step brings us to the database connection setup page. Here is where we’ll tell Movable Type where our database is and how to connect to it.
  5. You’ll note that the only database connection available to us is the SQLite Database and once again we’re being asked for the path to the database. This is the exact same path that you entered in Step 6 of Part II above:
  6. In order to proceed, you’ll need to Test the Connection.
  7. Once MT can talk to your database, then Continue onto the next step -setting up your email.
  8. From the drop-down, select Sendmail and accept the default Sendmail path. Enter your email address and click the Send Test Email Button.
  9. The next step is to set up the admin user and password.
  10. The final step is to create your first blog!

If You Found This Post Interesting, Then You Might Also Like:

35 Comments Posted in Apache, Blog, Internet, Mac OS X, Software, Technology
Tagged , , , ,

35 Comments

  1. Paul

    We hope to have an “easy installer” for Movable Type quite soon. It’s on the roadmap.

    In the meantime if you need assistance please feel free to contact me directly and I’ll try to help you where I can

    regards

    Michele

  2. Thanks Michele.

    Like you I’m beginning to find that WP does have significant performance issues. As a matter of interest, hoe easy have you found it to customise MT?

    Thanks,
    Paul.

  3. Wow, thanks for posting this. Your instructions really helped me install MT on my MAMP system.

  4. Glad it helped. It’s nice to see that someone actually finds this useful!

    Thanks,
    Paul.

  5. Hi Paul,

    A big Wordpress fan, I was pleasantly surprised to discover Moveable Type had an open source version available for download. I immediately searched for “MTOS MAMP” and found your excellent tutorial.

    I made an attempt to do the install today and got as far as Part III – Step 1. before I got this message:

    Got an error: Can’t locate object method “configure” via package “MT::ObjectDriverFactory” at lib/MT.pm line 877.

    I retraced my steps and I am confident I did everything correctly. Do you think it may be user error?

    Thanks,

    devon

  6. Thanks Devon.

    From the sounds of things, it doesn’t look like a user error – more probably a server side error.

    I’d recommend that you check that you have the latest versions of MAMP, Perl and MTOS installed.

    Hope that helps.

    Paul.

  7. Hi
    Just another person wanting to say thanks for this guide. You saved me several hours! Thanks!

  8. Thanks Greg. I’m delighted to hear that this was of use to you. Best of luck with your MT install!

    Paul.

  9. Hi PAUL,

    Thanks for ur gr8 tutorial, seems very useful, but i just wanna confirm that it’s what i think it is :)

    I understand that doing the tutorial steps will enable me to let my site updatable from nokia mobile phones using the web upload facility, is that true? And another stupid question; if yes; couldn’t one have done this by 1self? I mean wouldn’t a simple CGI script that handles and accepts uploaded posted items carry out the same function, please advise as I’m totally confused with this blog server implementation.

    Now my question regarding the installation:
    I’m getting the same error:
    Got an error: Can’t locate object method “configure” via package “MT::ObjectDriverFactory” at lib/MT.pm line 877.
    what r the latest versions that I should chk, n how can i chk them? or cna i b sure that perl -v is checking MAMP’s perl version not any old perl on my computer?

    Thanks a lot…
    Regards,
    Noha

  10. Hi Noha,

    Thanks for your kind words.

    The steps listed above are what’s required to install a local copy of the Movable Type blogging platform on an Apple Mac using the MAMP server. This setup is generally used for testing purposes only, though technically it could be used as a production server.

    The tutorial only deals with getting MT4 installed, posting to your site using your Nokia would require additional settings, or a plugin, within the MT4 platform. I’m not sure how it works for Movable Type. I do know that Wordpress allows you to post to the blog via email, and there are widgets available for Mac OS X that do the same thing.

    In relation to the error message, I haven’t been able to replicate the error, so I do not know why it occurs. Typing perl -V at the command line gives the version information for the included Mac OS Perl.

    After doing a quick check, on my Mac OS 10.5.2 I have Perl version 5.8.8, if that’s any help.

    Best regards,
    Paul.

  11. I have the same problem. All the latest software is installed.

  12. From the files that I have on my system, MT-4.01-en/lib/MT.pm calls the “configure” method on line 876. This method is found in MT-4.01-en/lib/ObjectFactory.pm on line 84.

    Just a couple of things to check off the top of my head:

    1) Check the file permissions on the MT-4.01-en/lib/ObjectFactory.pm file. Is it readable?

    2) Have any of the directory’s been renamed within the MT-4.01-en folder?

    3) Are there any spaces within the folder names?

    I’m on my way to work at the moment, but I’ll have another look at this when I get back.

  13. thanks for this tutorial. it was really helpful.

    i do have access to the backend now, can edit entrys and manage design and blog prefs.

    but – whenever i try to access the frontend, it does not show the blog, but only some text “mt-static – OK”.

    when i load the file:///Applications/MAMP/htdocs/mt/index.html manually (drag&drop), it shows the blog frontend home.

    what can i do?

    thanks in advance for any helpful tip.

    and happy easter!
    sinus

  14. Excellent tutorial. Exactly what I was looking for and it took me about 10 minutes. Well done.

  15. i have the same errors, too. and i found the reason from this page.

    http://yourdomain.com/mt/mt-check.cgi

  16. hi,

    i have the same error…
    i dont seem to have this object factory thing at all!
    i just downloaded mamp today, so it is the newest there is.
    the only reason i downloaded it was beacause i could not get mt working on the build in mac os x server.

  17. do you mean ObjectDriverFactory?
    it is located in the lib/MT folder and has read acces….
    but giving it write acces does not help.

  18. I got the same error installing MT on a FreeBSD platform running Apache, MySQL, PHP. What I have found is that MT4 requires both DBI and DBD::mysql. Check whether you have these Perl modules installed using mt-check.cgi

    After I installed these modules MT installed without a problem. However, I did run into some build issues with DBD::mysql and had to hack a bit at the code to get it to compile.

  19. Hi!, i try to install MT4 and have the same problem
    Got an error: Can’t locate object method “configure” via package “MT::ObjectDriverFactory” at lib/MT.pm line 877.

    I have installed phpMyAdmin, then MT4. i used the tutorial from the book Blog Design Solution from friendsofed.com (really good) but this message appears too.

    I will try with this tutorial. Then i ´ll tel you.

    I´m using an Macbook

    thanx

  20. Hi, I tried installing MT4 on plesk and got the same message:

    Got an error: Can’t locate object method “configure” via package “MT::ObjectDriverFactory” at c:\inetpub\vhosts\bukuria-malaysia.com\cgi-bin\lib/MT.pm line 877.

    Where can I get help regarding this, since your tutorial based on MAMP? Is there lots of different btw installing on MAMP and WAMP?

    Thanks.

  21. Thanks for this tutorial, got it to work on MAMP.

  22. Am I missing something, or is it true that this install procedure is it doesn’t allow for dynamic publishing in MT 4?

    I don’t see the option in the publish settings. Is it because it uses SQLite?

  23. Hi Will,

    It took me a while to find this, but it is possible to set up dynamic publishing.

    The setting you’re looking for is actually under the Design -> Templates menu. Once you’re on the Templates page, on the bottom right hand side you should see “Use Publishing Profile” under Actions. Click this link, and you’ll be presented with the option to use Dymanic Publishing.

    HTH,
    Paul.

  24. I’m getting the same error “Can’t locate object method “configure” via package “MT::ObjectDriverFactory”.

    I’m kind-of curious if people are getting this error more with OS X 10.4 then OS X 10.5. If that even matters.

    This tutorial worked great on my home computer (10.5). No problems.

  25. Good question Andrew. I don’t have OS 10.4 on my system to test with. If it is an issue with the OS version, it may just be a permissions issue. I’ll have to check and see what, if any, differences there are between 10.5 and 10.4.

  26. Paul, what version of Perl are you using? 10.4 has 5.8.1.

  27. On my Leopard 10.5.5 system it’s perl version 5.8.8.

    After a bit of searching I found this page on the MT website:

    http://www.movabletype.org/documentation/system-requirements.html

    From this page, MT4 is supported with any version of perl greater than 5.8.1, and with Apache versions 1.3x and 2.x.

    It does say that using mod_perl with Apache 2.x is not supported. I wonder if this could be the issue?

  28. Paul, this tutorial rocks. I have it bookmarked. Please never remove it from the interwebs. :) I look at this all the time.

    I am hitting one error. I’m getting this:

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

    But I’m positive my mt-static folder is there. When I view that address in a browser, I get “mt-static – OK”

    The only thing I’ve done differently than you is change the location of my document root. I like having it off my home folder so that Time Machine backs up all my local websites. It should still work the same, though. I’ve tried manually creating my mt-config.cgi file, too.

    Any ideas?

    Thanks again!

  29. Hi Clifton and welcome!

    I’m delighted that this post has been so helpful to you!

    First off, it might be that MT4 is unable to open the mt-static folder. Your home folder generally has permissions that allow only you and the system to access it. It could be the permissions may need to be changed.

    What’s the exact path to your MAMP htdocs folder. I presume if you’ve changed it, it’s something like ~/htdocs? Check the permissions on that folder and sub-folders (such as cgi-bin) as well.

    That’s all I can think of at the moment. I have to head to work, but I’ll play around with it tomorrow and post back with anything else I can find.

    Thanks,
    Paul.

  30. Thanks for this Paul, I was having trouble until I found your tutorial – nice work.

    I’ve managed to get all the way through the process but Movable Type fails when trying to write the configuration file: I get the following error: “The wizard was unable to save the Movable Type configuration file”

    I’ve checked the permissions and they’re set to 755 – even tried 775. I’m using 10.5.6, MAMP Pro 1.7.2 (demo).

    Any ideas on what might be causing this?

    Cheers

    Ben

  31. Paul,

    Thanks so much for the tutorial; I was all but beating my head up against a wall trying to get the perl to install on my computer. I was shivering to think of the rest of the install!

    You saved me a ton of time; thanks a ton.

    Cheers!

    Ted

  32. Thanks very much! This was extremely helpful.

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>