Local WordPress on Mac OSX with MAMP

After years of foolishly working on my live blog for all types of changes I decided to take a leap of faith and install WordPress 2.x on my G5 at home to use as a development environment. I will probably do the same thing on my work MacBook Pro and abandon my local copy of MovableType since I am a WP guy. When I did the MT thing on my MBP I found some directions and ended up in the Terminal doing all sorts of things … made me uncomfortable.

I have to give a tip of the hat to my friend and colleague, Chris Millet for introducing me to MAMP … MAMP is this nice little app that gets MySQL, Apache, PHP, and the associated admin apps you need running on your Mac in no time — as a matter of fact at the click of a mouse. Just download the thing, drop it in your Applications folder, double click the MAMP app (or fire up the included widget for use under 10.4) and you are but a click away from having Apache and MySQL Server fully installed and running on your machine. From there, installing WP was a dream. Here are the basic steps I used to get it running:

  1. Download MAMP
  2. Install MAMP by dropping the whole folder into my Applications directory
  3. Double click the widget in the MAMP directory (under 10.4.x) and it auto installed
  4. Flipped the widget over and set the radio button to PHP 4 — this is done by running the mouse over the bottom of the widget to expose the little i button. Clicked Done and it flipped back over.
  5. Clicked “Start Servers” and the little lights glowed green.
  6. I then tried to click the “Open Start Page” button on the widget, but nothing happened … if this happens go to the next step.
  7. Back in my Applications/MAMP directory, I double clicked the MAMP application and it opened.
  8. In there, I clicked the “Open Start Page” button and it opened a web page for me.

At this point MAMP is running and you are ready to install WordPress. To get WordPress running you do the following:

  1. Download WordPress
  2. While WordPress is downloading, go back to the start page MAMP opened for you and click the link at the top for phpMyAdmin.
  3. This is where you will set up a mySQL database to run WP on.
  4. In the phpMyAdmin page, under the Create new database box, type in a database name … for this you can call it anything you want … I named mine local_wp … again, it can be anything.
  5. Make DB

  6. Take your WordPress files and place them inside the Applications/MAMP/htdocs directory.
  7. Open the wp-config-sample.php file and update it with the following (given you named your database local_wp) … the thing that threw me for the first 20 minutes or so was adding that :8889 to the DB_HOST section.

    Config
  8. Rename the wp-config-sample.php to just wp-config.php and save it back in your Applications/MAMP/htdocs directory.

At this point you just need to point your browser to http://localhost:8888/wp-admin/install.php and finish out the process … from here it is as easy as can be.  So this should get you going in a few minutes with your own development environment on your machine.  Talk about a killer personal content management system! At this point, you could install all sorts of other open source PHP based stuff in the MAMP directory to try out and tweak.  I hope this helps!

11 thoughts on “Local WordPress on Mac OSX with MAMP

  1. MacOSX already ships with PHP4 and Apache installed and running. All you need to do is download the standard MySQL distribution from mysql.com, then you can install all the PHP goodness you like, without having to worry about :8888 or the like.

    That’s what I’ve done for local testing of WordPress, Drupal, and many other PHP apps.

    MAMP makes it nice and clean in one app package, but most of the bits are already in place in the standard locations, without having to worry about another installation.

    I have used MAMP to test PHP5 apps, which was a nice and easy way to get a PHP5 sandbox on my system without borking my PHP4 stuff.

    For MySQL admin, I swear by CocoaMySQL – a totally awesome client app that lets you do pretty much anything with a MySQL database, without mucking about in a browser or in the command line…

  2. I guess I should have mentioned that MAMP makes this all available to “the rest of us.” I have gotten all the goodies going before, but it isn’t the easiest thing for someone like me and it was a little scary actually. The MAMP thing is so easy and so straight forward it is actually something I would think just about anyone could make happen. The whole MySQL stuff my be a little tough, but even that is relatively straight forward. The other thing I like about MAMP is just being able to throw the whole folder away without it mucking with my system. I have no idea what I need to do to get rid of Movable Type.

    Either way it gives you a chance to test out some killer apps and build a very nice little PCM.

  3. Pingback: gaarf.info » Blog Archive » Fix for MAMP Dashboard Widget

  4. Jeff … you could do the real install with your webhost and then us the MyPHPAdmin to export your local WP database and import it to your hosted site. Make sure you have WP up and running at your host first.

  5. Hi, great site.
    Is it possible to view the wordpress blog from another computer within your network. I am trying to get a LAN wordpress working either on PC or MAC… any ideas?

  6. Slix … you’ll have to make sure you can leave the machine on and have some sort of webserver working. On the Mac it is fairly simple — on the PC I have no idea. You can turn on personal websharing on the Mac to enable it.

  7. Pingback: Granier on Digital Media Strategy - » New Look

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.