Make a Mac Web Server with MAMP and Wordpress
MAMP stands for Mac, Apache, PHP and MySQL, and installing it on your Mac creates a development environment for testing many of our favorite tools. You can do everything from browsing simple PHP files to testing complicated MySQL database driven applications right on your hard drive.
Installing MAMP takes just a few minutes. Macinstruct's Matthew Cone created a tutorial on installing MAMP and installing Drupal, so I won’t go into installing MAMP here. If you need help install MAMP, take a look Matt’s tutorial first.
Wordpress is another application that I like to configure on my machine and test before going live. Testing new themes, widgets, etc. is a lot easier directly on the development machine than it is to constantly upload new files and run them on the public site. With this little tutorial and MAMP, you’ll be testing in 10 minutes or less.
I’m using MAMP PRO, but the free version of MAMP works just the same. I have my MAMP settings running apache as users www/mysql. This is the recommended setting for a computer that is online, as it’s a bit more secure than using your user name.
Here's how to set everything up after you have installed MAMP:
- Navigate to the start page, http://localhost:8888/MAMP/?language=English or click open start page in MAMP PRO, and then click the link to launch phpMyAdmin to create a database for your wordpress install.
To keep it simple, I called the database WordPress, but you can name it whatever you like.
- Download Wordpress.
- Put the unzipped contents of the install in:
Applications > MAMP > htdocs directory
- Locate the wp-config-sample.php file in the Wordpress folder and open with a simple text editor. I use BBEdit, but you can use TextEdit if you prefer.
You’ll need to change the variables in this file to be the same as your MySQL information. If you don’t remember what that is, open MAMP and look at the the general settings panel under MySQL.
- Enter the name of the database you created, the user name, password and host (for MAMP this is probably locahost:8889).
Save your edited file as "wp-config.php".
- Now run the Wordpress installer from http://localhost:8888/wordpress/wp-admin/install.php. When you install, Wordpress will randomly generate a password. Make sure you save this and change it as soon as you log in, by going to the options menu in Wordpress.
- Go to http://localhost:8888/wordpress/. You should see a default installation of Wordpress, ready to start testing all those cool new themes or plug-ins!
Meet Your Macinstructor
Janet Fouts is a web developer and designer who provides tech support for a bevy of clients and friends who need a little help with their Macs.