Well, after consistent speculations regarding the new Magento release, Magento 2 is all out for serving as an excellent e-commerce solution for newbies and established online merchants. So, if you are a Magento fan and keenly looking forward to leverage the best features of this latest version, then you’ve landed on the right post. Here, I’ll be offering you a handy insight on setting up the Magento 2 Development Environment.
A closer look at Magento 2
While the beta release of Magento 2 saw light in December 2014, the Magento version was initially announced in the year 2010. The alpha version of the Magento release has been available on Github and you can register for the Magento 2 Dev Beta webinar. Considered as a huge step towards strengthening Magento’s marketshare, Magento 2 will be supporting all modern coding standards. Additional features would include: improved indexers, full page cache and multiple admin users.
Now, coming to the process of setting up Magento 2 Development Environment
Step 1. Reach out to Magento 2’s public repository at Github
Unlike Magento 1.X, the Magento 2 version comes with a public repository available on Github. Plus, you can also find an internal SVN-repository at eBay which has been properly synchronized with Github on a periodic basis. As a develop looking ahead to contribute to Magento 2, you can simply fork this repository, carry out the desired changes and submit the pull request.
Step 2. Choose a method for downloading Magento 2 onto your system
As explained in step 1, Magento 2 has been hosted on Github. This entails you to two options for downloading the Magento 2 repository. These two methods have been explained below:
1. Using git
If you’ve git installed in your system, you simply need to go to the web root and opt for issuing a git clone i.e. https://github.com/magento2.git command. With this, you can start downloading the Magento 2 repository. One of the best things about this method is that you can save yourself from the hassles of downloading the zip archive repetitively. Everytime you feel the need for synchronizing the local repository, you can simply issue a git pull for processing the moderated files from Github repository.
2. Using the Composer
Although there’s an uncertainty that all modules would be available as standalone-packages via Composer, Magento 2 is made available on Packagist i.e. magento/community-edition. In simple words, as compared to raw git, you can opt for the composer called: create-project mangento/community-edition [path] –-stability=dev for fetching the Magento 2 repository i.e. (omit [path] to install in ./community-edition). Additionally, in order to update local version of Magento with the upstream one, you simply need to run the composer update command in the project root.
Step 3. Start installing Magento 2 onto your working system
Now that you’ve all the required files available locally, the process of installing Magento 2 would become a breeze. For this, all you need to do is simply create a new database, go to the root of Magento 2 directory available within the web browser and follow the steps mentioned within the installer. Here, an important thing that needs to be kept in mind. During the installation process, there might be certain directories which may get marked as “not-writable”. So, before proceeding ahead, it is essential for you to fix these issues.
After having downloaded Magento 2, you’ll be able to spot Magento development folders/repositors/virtal hosts which are maintained under /srv/vhosts. Here, you also have the project folders where for each project, there is a main domain name. For example, if your website is sample.com, then the folder structure for the same would look like this:
Detailed explanation of the above folder structure is shown below:
- conf – this folder contains the usual configuration as well as the virtual host configuration files
- database – all the database change scripts and temporary dumps are stored in this folder.
- doc – this folder contains the project and code documentation
- design – this folder contains all the working PSD files, HTML templates, generated/exported graphics etc.
- keys – this folder includes the SSL certificate keys, project-related passwords etc.
- public – as the document root of Magento, this is the public folder which is being served to the
- util– this is a folder which includes all utility and helper scripts
After gathering a detailed insight on installing Magento 2, I’m sure the idea of switching to this latest Magento version won’t come up as a whole new challenge for you. Working within properly set Magento IDE will allow you to build remarkable Mageto solutions for a global customer base.
Isabella Morris is currently employed with a renowned Magento Ecommerce development services company and is also engaged in writing informative articles on best tools and tricks for Magento development. Her write-ups have proved beneficial for a wider group of Magento developers across the globe.