Magento is probably one of the most popular e-commerce platforms nowadays. This incredible system includes wide range e-commerce and security features that will make your online store very successful.
Magento 2 was announced in 2010. The plans were to release it by the end of 2011, but lots of things changed after that. In 2011, Magento was acquired by eBay. It is very possible than many time and effort were spent on reorganization.
Finally, in 2014 Alpha version of Magento 2 system was made available for developers. As for today new Magento 2 1.0.0-beta is available for developers to download, test and play around. You are also encouraged to contribute to the development of Magento 2.
The roadmap for the future looks like this:
- Q1 2015 - Developer Release Candidate has been developed
- Q3 2015 - Merchant Beta will be made available
- Q4 2015 - Merchant General Availability is planned
Magento 2 is, probably, one of the most discussed topics in the Magento community. It is clear that the market and the technology are ready, and, what is more, are willing to embrace the completely new version of this great e-commerce platform.
And today I’ll share how you can install latest verison Magento 2 1.0.0-beta.
Before starting installing Magento 2 you have to check the requirements and if your system meets them:
- Apache 2.2 or 2.4
- PHP 5.6.x or 5.5.x (PHP 5.4 is not supported)
- MySQL 5.6.x
NOTE: If you don’t have Apache server set up on your machine, you can try installing XAMPP or MAMP on your system. I’m using XAMPP on MAC OS X Yosemite.
Looks pretty usual right? As we go into more details I’ll show you what problems I did encounter and how I solved them.
To start installation, first you have to install Composer. Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. To download composer and install it we’ll use Terminal application on your OSX system.
Fire up Terminal and issue a command: curl -sS https://getcomposer.org/installer | php
This will download composer into your user’s root directory. In order to make composer globally available you have to move it to “/usr/local/bin/” folder and rename it from composer.phar to just composer. To perform this action you have to get back to Terminal and type: mv composer.phar /usr/local/bin/composer.
In case you encounter an error saying something like the file couldn’t be moved or renamed add “sudo” in front of the move command hit the return key and then enter your account password:
sudo mv composer.phar /usr/local/bin/composer
After your command is processed enter “composer” command in Terminal to check if composer has been installed and you are ready to proceed.
Now you have to download Magento 2 code from GitHub repository: https://github.com/magento/magento2.git. To do so, you could of course directly download ZIP file or use Git to do it.
NOTE: If you are unfamiliar with Git and GitHub please follow Create Markdown File And Push It To GitHub For The Data Scientist’s Toolbox Project At Coursera that covers Git installation and some basic setup.
In order to download Magento 2 files from GitHub repository, let’s first navigate to the folder to where you want to install Magento 2, and this will probably be your web server root directory (public_html or htdocs) and then issue Git’s clone command:
git clone https://github.com/magento/magento2.git
Till now everything’s fine. You have Magento 2 files in your webserver directory and now you are ready to use composer to download dependencies and set everything up to run Magento 2 installer.
Before proceeding I’d like to get back to Magento 2 requirements again. It turns out that Magento 2 needs some specific PHP extensions that you might be missing. When you are done and try to run Magento 2 installer you can see the PHP requirements:
To see if you have those extensions available on your system fire up Terminal application and type:
You will be presented with the list of all of the PHP extensions that you have on your system. Try to match all from screenshot provided above with your currently available extensions.
In my case I was missing mcrypt and intl and it took me quite a lot of time and research to figure out how to get them. If this is your case, please follow Install Ext-Mcrypt And Ext-Intl PHP Extension On Mac OS X And XAMPP article to get ready for the next step.
So now let’s continue with managing dependencies for Magento 2 with composer. What this really does is download the source codes of different libraries that are required by Magento.
NOTE: The official guide by Magento at this step covers installation of sample data so when you run Magento 2 you have categories, products, banners, users and even some artificial orders populated so that you have something to work with and play around. When I did download the sample data and then ran the installation wizard the process got stuck at 98% with an error saying that user with the same email address already exists and the installation process was unsuccessful. This might be some temporary bug or this error did happen exclusively with my installation.
To start downloading dependencies you have navigate to your Magento 2 directory on your webserver and run following command in Terminal application:
NOTE: At some point of download you might encounter message: “Could not fetch https://api.github.com/repos/pdepend/pdepend/zipball/~, please create a GitHub OAuth token to go over the API rate limit”. No need for panic. Just copy the link provded after “Head to” message, generate your token, paste it back to Terminal and hit enter.
When the download process is finished – you are ready to install Magento 2. This can be done either through command line tool or via Magento 2 web installer.
To install Magento 2 via web installer simply open up your favorite browser and navigate to your webserver and magento2 folder. In my case it looks like this: http://127.0.0.1/magento2/setup.
I hope for you as well as for me it’s very exciting to finally have a copy of Magento 2 beta version to explore it, read official documentation and hopefully start building my own online store or some cool e-commerce extensions and templates for Magento 2, really the worlds most effective, secure and flexible e-commerce system.