Develop Locally with MAMP
Posted by Adam Carmody on 05/24/07 in Development, Internet, Web
If 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.

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
Guest
Article Author
Contributor
+1
Subscribe to MacApper's Full Page Feeds
Subscribe to MacApper's Podcast
9 Comment(s)