Easy steps – install Magento® 2 Beta version

Magento® 2 is due for the end of year 2015, but you may already want to try it. This new version contains many improvements and is going to be a major upgrade.

While working with Magento® 2, we can easily see that the database structure has been kept, which means that it should be easy to upgrade from Magento® 1 to Magento® 2, but the code has been completely revisited and none of the modules available for Magento® 1 will work on Magento® 2. This is for the good, because now Magento® 2 benefit from:

  • new optimized file structure
  • new layout elements
  • jQuery replaces Prototype JS
  • no more factory names (such as Mage::getModel, Mage::helper, etc.)
  • etc.

We now know that Magento® 2 will contains many improvements, but we need to be prepared to migrate when the d-day will come and here is the steps you can follow in order to install the new version of Magento® on your server:

  • Go to your www root directory and type the following: git clone https://github.com/magento/magento2.git
  • Go to your magneto directory: cd magento2
  • Download composer with the following command: wget -O ./ http://getcomposer.org/composer.phar (alternatively, you can use curl -O http://getcomposer.org/composer.phar)
  • Add sample data to composer.json by using the following command line:
    • php composer.phar config repositories.magento composer http://packages.magento.com
    • php composer.phar require magento/sample-data:">=0.42.0.beta1" magento/sample-data-media:">=0.42.0-beta1" --dev
  • Install Magento® 2 and load sample data: php composer.phar install
  • When installation is done, you can access to your Magento® setup by using the following url: http://127.0.0.1/magento2

Note that you can alternatively install composer as the following:
wget -O /usr/local/bin/composer http://getcomposer.org/composer.phar
chmod +x /usr/local/bin/composer
wget -O /usr/local/bin/composer http://getcomposer.org/composer.pharchmod +x /usr/local/bin/composer

If you do that, you can use commands such as: composer install instead of php composer.phar

Also note that you might need to specify full path of php binary. For example, if you are using XAMPP under mac, you’ll need to do the following: /Applications/XAMPP/bin/php composer.phar… instead of php composer.phar…