11

Develop Locally with MAMP

MAMPIf you run a website chances are you’ve had to make this excuse: “Uhh…. I’m coding right now, things might not work right for a while.” With first impressions being what they are, new visitors to your site aren’t likely to stick around long to see what kind of innovative and interesting things you’re adding to your site. Worse still, you could be live editing and make a mistake that costs you days, weeks or even permanent downtime. We all make mistakes, we’ve all hit that Save button just a little too slow (or too fast, depending on the situation). When you’re working with a website (especially a dynamic site like a blog) that’s just the chance you have to take. Or is it?

Living-e has the solution to the live editing problem: MAMP. MAMP (stands for Macintosh, Apache, MySQL and PHP) is a self contained web server that allows developers to create their fully featured, dynamic web pages in a local, off-line environment. Basically, it saves your visitors from errors and instability while you work.

If you’ve ever tried to set up a server on a local machine you undoubtedly know how much work can go into it. You’ll need to download copies of Apache, PHP and MySQL plus the other little things that make your host’s machines run. You need to make advanced adjustments to configuration files, and if you’re very careful and a little lucky you’ll end up with a shaky environment that has altered the core of OS X.

MAMP attacks the beast in a different way. Installation of a fully featured server is as simple as dragging an icon to your Applications folder. After installation you can launch MAMP either from the Applications folder or from the included Dashboard widget. The entire development environment is contained within the Application Folder meaning that if you have taken the time to set-up an Apache server on your Mac it won’t be affected by the MAMP installation. And, if something goes horribly wrong, you can just delete the MAMP folder without affecting the rest of your system.

MAMP

Once you’re up and running there are just a few preferences to consider before going off on a coding extravaganza. MAMP initially defaults to PHP5, but if your remote server is stuck in the past you may want to opt to work in PHP4 from either the main MAMP window or even from the widget.

MAMP ships with support for both MySQL and SQLite. Thankfully, living-e knows how much most people hate working in the command line. MAMP negates the need to play in the terminal to manage databases by bundling both phpMyAdmin and SQLiteManager to take care of nearly all your database needs (the only thing I’ve ever needed the terminal for was to change the root SQL user’s password). After you’ve gotten your development environment all set up you can go to work editing, displaying and moving files just as you would on a normal server but without the FTP client and all that waiting around for up/downloads. And, there’s the added benefit of not having to lose a second of uptime when you need to update, build or tweak your website. When you’re satisfied with your work, just FTP it up to your remote server and everything should be golden.

So save your visitors from the dreaded 404 and all the craziness that can ensue when you try to edit live websites. They’ll thank you, your host will thank you and you’ll thank yourself for eliminating so many potential headaches. MAMP is developed by living-e and is available for free under the GNU-GPL License at MAMP.info

9 Comment(s)

Legend: Guest Article Author Contributor
  • 1

    Mary-Ann Horley said on

    May 24th, 2007 at 12:31 pm

    Whenever I’ve tried this (with WordPress) I’ve ended up with loads of SQL errors at the top of the web page. I know no one can tell me exactly what’s wrong without more details but before I try it again is there anything obvious that server noobs are likely to miss?

    (subscribed to comments)  Add karma Subtract karma  +1
  • 2

    Adam Carmody said on

    May 24th, 2007 at 1:26 pm

    That is a tough one to try and diagnose without more info. It’s been my experience that a fresh install of WordPress has always worked “out of the box.” Are you trying to import your database from another server?

     Add karma Subtract karma  +0
  • 3

    Wade Sakundiak said on

    May 24th, 2007 at 1:34 pm

    This app is a dream. Easy to set up and a great way to try things out. Absolutely indispensable.

     Add karma Subtract karma  +0
  • 4

    Mary-Ann Horley said on

    May 24th, 2007 at 2:00 pm

    OK, downloading the newest version and will report back.

    (subscribed to comments)  Add karma Subtract karma  +0
  • 5

    Jimb0 said on

    May 24th, 2007 at 2:57 pm

    MAMP is the best thing ever. So easy to use. It’s great to set Dreamweaver up to a local server with PHP and MySQL, and whip up database tools with DW’s built in behaviors.

     Add karma Subtract karma  +0
  • 6

    Michael said on

    May 25th, 2007 at 12:22 am

    love MAMP. Use it al the time, especially when I’m working on modifying wordpress themes.

     Add karma Subtract karma  +0
  • 7

    Mary-Ann Horley said on

    May 25th, 2007 at 7:08 pm

    Well, I’ve never seen such a crap readme. No start page in htdocs either (only found out it was supposed to have one from trawling the net) and no phpMyAdmin. Good job Locomotive worked, guess I’ll be a RoR coder and just use my limited PHP for WP fiddling.

    (subscribed to comments)  Add karma Subtract karma  +0
  • 8

    Kevin said on

    June 4th, 2007 at 12:48 pm

    MAMP was one of the first apps I installed on my Macbook after switching from windows a few months ago. I had used XAMPP on XP and found MAMP which was basically the same thing. Mary-Ann: Try this http://cocoamysql.sourceforge.net for a phpmyadmin GUI replacement. It works great for what basic mysql stuff I use it for.

     Add karma Subtract karma  +0
  • 9

    bryan said on

    June 9th, 2007 at 5:35 pm

    This is really a great app, good for those shifting from windows,

     Add karma Subtract karma  +0
  • 2 Link(s) Referencing this Post

    More at MacApper

    • Discuss 'Develop Locally with MAMP' in our new Mac Forums

    Post a Comment


    Post your comment below (spam filtered)