Using MAMP (Macintosh-Apache-MySQL-PHP) for Macintosh
From Textpattern CMS User Documentation
MAMP, or Macintosh-Apache-MySQL-PHP, is a development stack for Macintosh. It allows you to do local development without compromising your live work. In this case, we assuming you're using it for doing Textpattern development, but of course it can be used for any kind of PHP development you want.
Ready? Let's go.
We won't count this as an actual step, but you do need to download MAMP...
Unpack the zip, run the .dmg, and make sure you add MAMP to the root of the applications directory (/applications/mamp/)
Step 1: Initiating MAMP
Open MAMP in /applications/mamp/ on your Mac. You will see the MAMP Server screen as shown in the following figure.
If the servers did not start automatically, you can start them now. Lights under the "Status" section will be red if they are not started and green if they are, as shown in the following figure.
Also, a MAMP start page will appear in your default browser, which will confirm everything is running as it should be. The MAMP start page appears like the following figure.
If you don't see the start page, check to make sure you do not have Apache running in your apple system preferences (you dont want the OSX default version of Apache conflicting with MAMP). Check this by going into your system preferences, and go to Sharing. See the following figure for how it should look.
Step 2: Checking MAMP's Standard Configuration
Next you should quickly check to make sure the preferences are right for you, they should be all standard if you want to use this as a development test bed (which is the focus with these instructions). The MAMP Preferences screen appears as follows.
And the the Ports screen appears as follows.
There is a third screen of preferences for choosing wether you want PHP-4 or 5, it defaults to 4.
WARNING: If you are going to serve-up your Textpattern site from your local machine to the world (which we are not covering here), then the previous three images may not depict the configurations you need. If you intent to use MAMP for more than just a test bed for Textpattern and are having trouble with your configurations, go to the MAMP Support Forum for help.
Step 3: MAMP Start Page Orientation
Go to the Mamp Start page in your browser, and click on the link called phpInfo (second from left along the top). You will see the screen shown in the following figure. There is not much you do here, but if your MAMP install were having problems, you should see some indications in red, which you could then use to troubleshoot or take to the MAMP Support Forum .
The next link is the MMCache link. If you followed this you would see that you can disable, clear, or clean your PHP cached items, but right now you won't need to do anything so we won't discuss it or show an image for this page.
The important link is for phpMyAdmin, which takes you to a screen as shown in the following figure. This is where you create your MySQL database to use with Textpattern. The rest you can do through the textpattern installation.
Step 4: Using MAMP to Create the MySQL Database
Assuming your installing textpattern on your newly working Apache web server, you need to create a database and user for this to work.
On the phpMyAdmin screen (as shown in the previous step), under the section for MySQL, add a database name in the Create New Database field. Click the Create button. The database should appear on the left under the phpMyAdmin logo in a drop down menu with a couple of other default databases.
Step 5: Creating a User for the MySQL Database
Now you will create a user for the database. Click on the Privileges button under the MySql header. A list of a few users will appear (all root), as shown in the following image.
Click on the link to Add a new User, and fill in the details for the new user. An example user profile is shown in the following figure. (You can change the permissions as needed.)
Click on GO and you should get a confirmation in purple at the top, as shown in the following figure.
Step 6: Adding your Textpattern Files
You should now be able to use your Mac as a development server platform for Textpattern. Lets give it a go with a fresh installation of textpattern.
You will add your Textpattern file structure to the following directory, just as you would to your desired directory on a Web server:
If you have not changed your ports in the MAMP configuration, as we are assuming in these instructions, the address that should be used in your browser to test your Textpattern site is:
Since you now have the database created (see Step 5), you should now be able to run through the Textpattern installation process at this location and go from there.
Good luck using MAMP.
Courtesy Step 7: Useful Tip
You can make an Alias of your htdocs folder, giving it a custom icon, as shown in the following figure, then you can quickly access this directory and add databases using MAMP and add files through your htdocs folder.