Magento is an open-source e-commerce platform written in PHP. November 25, 2015 Magento 2.0 was released and the latest version is 2.1. Architecturally, Magento employs a MySQL relational database management system, the PHP programming language for the back-end and applies a Model-View-Controller paradigm for the front-end.
I will walk through installing Magento 2.1 Community Edition with sample data on a Windows 7 box through a command-line interface (CLI).
- Download XAMPP
- Download Composer
- Download Magento 2.1.0 CE with Sample Data
- Extract Magento to /{XAMPP_DIR}/HTDOCS
- Edit /{XAMPP_DIR}/php/php.ini in a text editor
- extension=php_intl.dll
memory_limit=328M
max_input_time=300
max_execution_time=18000
zlib.output_compression=On
session.auto_start=Off
suhosin.session.cryptua = Off
- extension=php_intl.dll
- Update/change MySQL password
- Open XAMPP control panel
- Click Shell button to open a command line
- type: mysql -u root -p “”
- Press ENTER
- It will prompt for a password. If current password is not set, just press ENTER
- type: set password for ‘root’@’localhost’=password(‘root’);
- Press ENTER and password will be updated to “root”.
- Update phpMyAdmin with MySQL password change
- Open XAMPP control panel
- Click Config button under Apache module
- Select config.inc.php file
- CTRL + F to search for “password”
- Add your password inside single empty quotes of: [‘password’] = ”
- Start both Apache and MySQL modules in XAMPP control panel
- I am running APache on port 81 (HTTP) and 443 (SSL)
- I am running MySQL on port 3306 (default)
- Open up Chrome browser and go to http://localhost:81/phpmyadmin
- Click New to create a new MySQL database (i.e. magento_demo)
- Open up a commant prompt and go to /{XAMP_DIR}/htdocs/{MAGENTO_DIR}
- type: composer install
- Install Magento 2 and populate database
- type: php bin/magento help setup:install
- The above command will tell you the required fields
- type: php bin/magento setup:install –base-url=http://127.0.0.1:81/magento-ce-2.1.0/ –db-host=localhost –db-name=magento_demo –db-user=root –db-password=root –admin-firstname=christopher –admin-lastname=rudy –admin-email=crudysandiego@yahoo.com –admin-user=crudysandiego –admin-password=tables33 –language=en_US –currency=USD –timezone=America/Los Angeles –use-rewrites=1
- Successful install message should be outputted to terminal along with Admin URL (i.e. http://127.0.0.1:81/magento-ce-2.1.0/admin_k5baps)
- You can find out the URL to Admin login by going to {XAMPP_DIR}/htdocs/{MAGENT_DIR}/app/etc/env.php
- Search for: ‘frontName’ => ” (i.e. ‘frontName’ => ‘admin_k5baps’,)
- The options above need to be in this order to install Magento. Change any option values to your settings
- Magento will be installed at: http://127.0.0.1:port/{Magento_DIR} (i.e. http://127.0.0.1:81/magento-ce-2.1.0)
- You should see the Magento home page with the URL in above step
- Go to http://127.0.0.1:81/magento-ce-2.1.0/admin_k5baps and login to Admin panel with admin user/password to verify you have admin access (i.e. crudysandiego / tables33)