- Download, install and setup MAMP or MAMP Pro
n.b. For further instructions on how to set-up Mamp Pro like a pro, see this Gist
-
Expand the Magento tar file into your chosen directory (I use
~/Dev
), rename the createdmagento
folder as you wish and enter the directory
$ cd ~/Dev
$ tar -xvzf ~/Downloads/magento-x.x.x.x.tar-yyyy-mm-dd-hh-mm-ss.gz
$ mv magento fresh_magento && cd $_
- Expand the sample data tar file. Copy recursively the
skin
andmedia
folder contents into the corresponding Magento directory.
$ tar -xvzf ~/Downloads/magento-sample-data-x.x.x.x.tar.gz
$ cp -R magento-sample-data.x.x.x.x/skin ./skin
$ cp -R magento-sample-data.x.x.x.x/media ./media
- Import the sample database into
mysql
-
If you don't already have a database
$ mysql -u <user> -p $ CREATE DATABASE <db_name>; $ EXIT;
$ mysql -u <user> -p <db_name> < magento-sample-data.x.x.x.x/magento_sample_data_for_x.x.x.x.sql
- Modify file permissions
$ find . -type f \-exec chmod 644 {} \;
$ find . -type d \-exec chmod 755 {} \;
$ chmod -R 777 app/etc
$ chmod -R 777 var
$ chmod -R 777 media
- Visit your local server's host URL to initiate the installer.
The options are pretty straight forward, I would suggest to check the following options:
Skip Base URL Validation Before the Next Step
Because we're on a local environment, we don't need Magento to issue awget
request to our server to validate it.Use Web Server (Apache) Rewrites
This means Magento will automatically strip out the ugly/index.php/
from URLs
Install these immediately if you don't want to waste 100s of hours:
-
n98-magerun (FREE) The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API. http://magerun.net/
-
Commerce Bug 2 (~$50) Commerce Bug 2 is the must have upgrade to Pulse Storm's development and debugging extension for the Magento platform. Commerce Bug will help any Developer, designer, or IT professional programming and configuring the Magento Ecommerce system.