Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5489

Magento2 Folder Structure

$
0
0

Magento2 Folder Structure – Magento2 (M2) have a solid set of tech stacks including

  • Symfony2 bundles
  • MVVM – Knockout js
  • LESS
  • Grunt
  • Laravel Style command line tool
  • UI component
  • and finally composer driven

and many more new concepts , Magento2 folder structure  also been changed a lot from previous version of magento . I will explain one by one  . You can view complete folder structure at magento 2 folder structure
magento2-folder-diagram
I will explain with the newer one those are very new and introduced in magento2
pub – 
As laravel or in symfony2 there is a public (web )folder and where web server points . This is kind of same pub folder is where your web server should point it contains all the auto generated resources (asset) as magento2 have various mode

  • Production – Need to run following command to generate the asset php bin/magento setup:static-content:deploy
  • Development – All front end resources are generated in real time on every request
  • default   – All front end resources are generated in real time on every request

also write permission must be there in recursive mode as those content / resources are auto generated

 

Vendor

Vendor folder is genrated by composer using composer.json file . If you will see magento2 vendor folder you will see there is no files or folder and the simple reason is composer.json will create those folder as per the screenshot

magento2-vendor

you can see various packages which has been defined under composer.json file magento2 composer json

bin

This folder is used for strong binary files those are executable like artisan tool in laravel or  symfony2 command line tool . As magento2 comes with default command line tool and can be viewed as  by typing

magento2 command line tool

There are many more command which can be viewed by using the help parameter . Magento2 command line tool is super useful and every one should use it .Will explain more about Magento2 folder structure . Stay tune

 

 


Viewing all articles
Browse latest Browse all 5489

Trending Articles