Posted on Dec 3, 2017 |
Posted in Magento
, Magento 2
Magento, one of the most stable ecommerce systems has released its most awaited version – Magento 2. The fascination for Magento 2 has already begun and developers have started digging into the Magento 2 folders to learn various things. Most commonly, novice developers use WAMP server for learning as well as development. This post is about setting up the server configurations and installing Magento 2 in WAMP server.
Download and extract the Magento 2.0.7 Community edition and extract into the wamp/www/your_magento_site/ directory. After extracting the files, load the following URL in your browser: http://127.0.0.1/your_magento_site/ The Magento 2 Installation wizard pops up. Click on Agree and Setup Magento In the Readiness check page, click on the Start Readiness Check button. Magento will check if your server configurations meet the requirements needed for Magento 2. If you receive the following error in the PHP Settings, Check:Your current setting of xdebug.max_nesting_level=100. Magento 2 requires it to be set to 200 or more. Edit your config, restart web server, and try again. Open wamp console, and click on the php.ini to open the file:The php.ini file will be located in the following path:<Your Drive>:\wamp\bin\php\php5.5.12\php.ini The above mentioned php5.5.12 varies depending upon the WAMP version that you have installed. In the php.ini file, search for the line “xdebug.max_nesting_level = 100” and change the value from 100 to 200. If this line does not exist, add this line to the end of the file:xdebug.max_nesting_level = 200 Magento 2 requires the following extensions to be enabled:
Most of these extensions are enabled by default. If any of the above extension is not enabled, you can enable them by using the WAMP console. Please refer the below screenshot:If the extensions are not listed in the WAMP console's PHP extensions, you can directly edit the php.ini file and uncomment the corresponding extension. Remove the semi-colon (;) to uncomment and enable them:Once you have enabled the corresponding extensions, restart all the services in WAMP console. Click on the Try Again button and Magento will check for the requirements again. Once all the server requirements are met, click on the Next button to proceed.In the “Add a Database” page, enter the database details. When you work on your local machine, the host is most probably “localhost”. Enter the other details like username, password, and the database name. The table prefix is an optional entry, which you can provide if you wish to have a prefix text added before all the table names. Prior to clicking the next button, make sure that the database name you have mentioned in this page is already created. If not, log on to your mysql console or phpmyadmin and create the database. In the below screenshot we have used the database name “magento2_new”:The next step allows you to define the base URL for both frontend and admin panel of the your magento 2 instance:In the following step “Customize Your Store”, you can specify the Default Timezone, Currency and Default Language of your magento site:Specify the username, email, password for the account that you will be using to access the Magento 2 Admin panel:In the next step, click on the “Install Now” button. It might take some time for the setup to be completed. Once the setup is completed, the below success page will get displayed:Magento 2 creates a new admin path URL with random numbers and alphabets. So it's better to bookmark the admin path to get to the admin login page without needing to remember it. And VOILA!, here is your all new Magento 2 Website:
You can also enable the rewite module by editing the httpd.conf file. The httpd.conf file will be found in the following location:<Your Drive>:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
- If you end up in a messy homepage with no CSS and styles, and your admin page displays “404 Not Found Error”, you need to enable the mod_rewrite module in the Apache and restart all the services in the WAMP console. You can enable it using the WAMP console as displayed below:
Open the conf file and search for the line:
LoadModule rewrite_module modules/mod_rewrite.so Uncomment this line by removing the # at the beginning of the line. Do not forget to restart all the services in the WAMP console before looking at the changes in the browser. In the following posts we will explain how to install Magento 2 using composer.