Important MAMP commands & Setup Tips
There are often times that a developer - using MacPorts MAMP - needs to make quick adjustments. In those cases the command line or terminal is the way to go. Here Imagewize will share some commands it uses very often and thinks is useful for all OSXers who use MacPorts
Going to htdocs the easy way
Every time you need to go to MacPort's htdocs you have to fill in
. This can be made way easier using a unix style symbolic link. Open a terminal window and enter the following command: Et voila, from now on will lead directly to your LAMP htdocs folder!Starting Apache
If you do not have MAMP running from startup like I do on my MacBookPro you can startup Apache manually using the following command:
PHP.INI Adjustment && Restarting Apache
Restarting Apache on your local server is a very important command since you might want to plauy around with your LAMP Server settings from time to time. Today I wanted to turn off the display of errors in PHP so I could make a small video tutorial. So I went into my PHP.ini . To find out where your php.ini is you can type:
But you then get the Mac's standard PHP location. In there there is a config file in which you can find the location of the php.ini : The config file path is the path to the .ini. The you open the php.ini using Vim:and turned it off:
Afterwards I had to restart Apache for the change to take effect so I entered the folllowing command:You have to add the path to the command unless you have created an alias.
Creating an alias
You can add an alias to your profile to start, stop and restart Apache easier by editing the profile file, in this case a command to restart Apache2 as I needed that:
and addfrom that moment on you can restart Apache2 using
from the command line.NB Vim should be preinstalled on OSX 10.6.x
MAP Installation using MacPorts
To install MAMP on MacPorts see this link.
| < Prev |
|---|


