Mac OS X comes with inbuilt web sharing (powered by apache web server). But it lacks the necessary PHP and MySQL required to power the most web applications. It is much easier to install complete solutions such as MAMP or XAMPP, instead of installing MySQL and PHP individually. Come on, Let’s take a look…
MAMP is a free local server environment and stands for Mac, Apache, MySQL and PHP. MAMP also comes with a professional version named MAMP Pro (costs $59) with added features. Yes, MAMP is snow-compatible.
Download MAMP here (Current version as of writing of this article is 1.9.4)
Skip to Configuring MAMP | Adding a database | Installing WordPress | Syncing
Step 0 : Disable the inbuilt web sharing
-
Open “System Preferences” and click “Sharing”.
-
Make sure “Web sharing” is unchecked.
This will disable the inbuilt OS X web sharing. OS X web sharing uses the default HTTP port(80) for the communications. With the web sharing disabled, Port is now free for use with MAMP. Also who needs web sharing, when we have MAMP?
If you are choosing not to disable web sharing, Then you have to append “:8080” to the URL(localhost), everytime.
Step 1 : MAMP Installation and Configuration
Installation
-
Extract the downloaded zip file that holds the Disk image (dmg).
-
Open and mount the disk image (MAMP_MAMP_PRO_1.9.4.dmg)
-
Please click “Agree” to accept the license agreement. This will reveal the contents of the disk image.
-
Drag the MAMP folder to the Applications directory. Installation can not be more simple.
Starting the server
Now go to “Applications” in the Finder and the look for the MAMP directory inside. Open the MAMP application. Click “Start servers”, if not already started.
-
MAMP can always be started through the main application.
-
MAMP also comes with a Dashboard widget (Mamp Control.wdgt), located in the MAMP directory. Open and click the Install button. Press F12 to access.
-
MAMP asks for password at each startup, not to mention the application always sticking around the dock. Widget is more convenient.
Auto Starting MAMP in Mac OS X
If you want to auto start at login without needing to enter password at every start, you can do this through following applescript.(Thanks to robg From MacOSHints)
Paste the following to the Applescript Editor, Change the “your_username_here” and “your_password_here” to your OS X username and password, and save as a run only application.
Applescript for Autostarting MAMP at login.
# Enter your username and password in the below line. # Auto start the apache server. do shell script "/Applications/MAMP/bin/startApache.sh &" password "YOUR_PASSWORD_HERE" user name "YOUR_USERNAME_HERE" with administrator privileges # Autostarting MySQL and redirecting the output to NULL. do shell script "/Applications/MAMP/bin/startmySQL.sh > /dev/null 2>&1"
Paste this code in AppleScript Editor and save as a Run-Only application.
Now add this application to “Login items”. To do this, Click “System Preferences” –> “Accounts”. Click your User name.
Damian from 46palermo has a more convenient solution, Which can be found over here.
Configuring MAMP
-
Click “Preferences”.
-
Click the tab “Ports”. Now change the Apache Port from “8080” to “80”. Leave the MySQL port unaltered.
Adding a new MySQL database in MAMP
-
MAMP comes with phpMyAdmin, one of the easiest MySQL configuration tools available.
-
Enter the URL http://localhost/phpMyAdmin (note the caps, are case sensitive in OS X) in your browser. (phpMyadmin can also be accessed via the MAMP start page)
-
Enter the username, password and the host(localhost) . Grant all privileges for the user. Click “Check all” in global privileges. Finally Click “Go”. Doubts? Check the image below.
-
Carefully note down all the details you entered.
Install wordpress 3.0.1 in your local server
-
Download wordpress 3.0.1 from wordpress.org.
-
Extract the wordpress directory from zip file into your server document root (htdocs).
-
Rename the wordpress directory into wp. You may choose to leave it as “Wordpress”, but I am lazy

-
Since wordpress 3.0, there is no need to create or edit wp-config.php manually, because WordPress will do it for us.
-
Go to http://localhost/wp in your browser. Don’t be alarmed, if the browser title says “Wordpress > Error”, don’t panic. Nothing wrong. Now click “Create Configuration File”.
-
WordPress welcomes us and provides us with a series of configuration screens. It gives us the list of database details we need. They are
-
-
Database name : It is wp
-
Database username : root (or the username you chose, if you did)
-
Database password : password you entered
-
Database host : localhost
-
Table prefix (if you want to run more than one WordPress in a single database) : Default is “wp_”.
-
-
-
Next page prompts you to enter Blog’s Title, Username, Password. Enter them. Remember these are NOT your database username and password.
-
Uncheck “Allow my site to appear in search engines like google and technorati”.
-
Click “Install WordPress”.
-
Login to access your dashboard.
-
Browse to http://localhost/wp . There you go!
Things to remember when using MAMP
-
It is not advisable to run MAMP over the network due to security issues. Setting up the users and passwords may increase the security, But still is not enough.
-
File names are case sensitive in OS X (Unless you chose a case-insensitive file system while installing). If you use work on both windows and OSX, this gains importance. Always try to name the files in lowercase.
Thanks for reading, I appreciate your input.
Kavin Gray
This is Part 2 of the Local server series.
Part 1 : Installing Local server in Windows using XAMPP
Part 2 : Installing Local server in Mac using MAMP – This article
Part 3 : Complete Guide on syncing MAMP and XAMPP using Dropbox











Pingback: How to install portable local server on your windows PC using XAMPP | Capability , .
Pingback: Complete guide on syncing XAMPP and MAMP using Dropbox | Capability , .
Pingback: Wordpress dropdown menu with wp_nav_menu and CSS | Capability
Pingback: Add an awesome dropdown menu to wordpress with Superfish | Capability