Using MAMP and LAMP for WordPress development

My FTP program is a time thief. Sometimes when I’m in the middle of a major edit, it’ll hang or crash or simply refuse to do what I’m asking it to. More often than not however it will simply choose to take seconds to do what I want it to do in a fraction of a second.

What am I going on about? Frankly, sometimes my tubes are clogged and FTP’ing changes to my web host takes far too long. It’s not their fault, I live in a city with free high speed WiFi access virtually everywhere in town. This is great but it means that I do a surprisingly large amount of my work sitting in coffee shops, on park benches or along the river. The bad part is that it’s a public WiFi so I’m reluctant to use FTP passwords across the network and sometimes it’s a little slower than I’d like.

My Solution? MAMP, Macintosh Apache MySQL PHP, it’s available from http://www.mamp.info/en/index.php and it’s free. There’s also Windows and Linux versions of the tool but since I’m a MacHead I choose to use the version best suited for me. What MAMP does is install the equivalent of a Linux web server on your computer, which allows you to host your own WordPress web sites on your local computer for development purposes.

To do this, first you’ll have to download the MAMP installer and set it up on your Mac (remember, there are PC versions called LAMP). Next, copy your WordPress web site in the /Applications/MAMP/htdocs/ directory and set up your local copy of WordPress as you normally would.

If you already have a copy of WordPress running on your hosted blog, use your phpMyAdmin control panel to export your database and install it on your laptop. Next, download and edit your local copy of wp-config.php to have the following settings:


define('DB_NAME', 'intranet'); // The name of the database
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASSWORD', 'root'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

If you’ve done everything correctly, you can now access a local copy of your WordPress web site from http://localhost:8888/wordpress/.

Remember, changes to your local blog *do not* update your hosted blog but this is a great way to make edits to your templates, test local content and develop client web sites in a localized, hosted environment.

For bonus coolness, if you setup your Adobe Dreamweaver site correctly you can make edits to your themes without having to upload anything to a web server. I know this is a sad confession but I use this technique regularly while sitting in airport terminals.

I’d love to be able to sync my live blog directly with my local offline copy every now and then, so that I can always have a fresh copy on my MacBook. What would you do?

Leave a Reply

Your email address will not be published. Required fields are marked *