This certainly means that understanding how it works and majorly understanding the important areas and files and folder structure of this CMS is even more important. For a PHP Developer it is certainly tough to identify how Magento functions and hence this Webbing Wednesday we decided to make every one aware on the File structure of Magento.

First thing needed is Download Magento ( and then install the same on your local machine or on your server.

Once this is done, please start looking into the root directory and follow the details below:

Magento Fresh Install

  1. .htaccess:This file is used for rewriting the URLs and making URLs SEO Friendly. This file is also used for directives which helps improving the performance.
  2. app (directory)This is one of the most important folder for building the website. This folder contains modules, themes, configuration and translation files. Moreover, the folder also contains all the default template files and admin theme.The folder can be divided into two segments:
    1. Code:
      The code folder is the engine of Magento, which can further be divided in 3 segments:
      Community: where all the paid extensions reside;
      Core: Where default Magento core files reside communicating directly with the libraries of Magento;
      Local: Where Modules resides.This pretty much summarizes that the core folder is the backbone of Magento and it is highly sensitive and imperative part of the Magento structure.
    2. Design
      This folder contains all the Design Files as the name suggests. This part of the folder can also be subdivided into 2 more segments.
      Admin: This part covers the Layout and Template files for Admin area of Magento;
      FrontEnd: This part covers the Layout and Template Files for the front end of the web page.The website will look beautiful with the correct and maximum use of this folder and all the cosmetic changes can not be done without this very important part of the entire engine.

      Well since this pretty much covers the the website, it is important to share how this functions:

      Layout XML files residing in Design Folder in the front end section are mainly used to combine XML tags and Blocks for configuring the classes and functions and making it connect to the front end of the web page. In a nutshell when a page runs, Magento reads all the XML files and process the page with the functions and classes received from combining the tags and blocks as mentioned above. This procedure is highly simple to understand and have been implemented in much better and organized way in Magento, which to our best understanding no other eCommerce platform offers.

  3. cron.php
    Its very well known that the magento caching issues can cause trouble to a perfectly functioning website and can certainly affect performance of the website. The cron is used to set the time period for executing the file to ensure the caching of magento is periodically updated.
  4. downloader (directory)
    Magento has recently been upgraded and this is exactly what this downloader directory does. It is a storage area for web downloaded files, for installation and upgradation of magento through browser.
  5. js (directory)
    This is another important folder of Magento containing the precompiled libraries of the JavaScript code included in Magento.
  6. lib (directory)
    The Magento PHP libraries on which the app folder runs and functions are located here and this is one of the most critical folder of the entire Magento Setup.
  7. media (directory)
    As the name suggests, the directory is for storing the media files and auto generated thumbnails for product images in different sizes. The images are organized in a much fancier and nicer way. This folder can also be used for import/export of mass transfers.
  8. mage
    The file controls the automatic update through the downloader script for each individual Magento module.
  9. pkginfo (directory)
    Contains files with info about upgrading teh modules and changes.
  10. report (directory)
    As the name suggests it reports the Magento errors and manages the logs for the same.
  11. skin (directory)
    This is where the themes are located along with the images, css and all the supportive elements for the theme. Moreover the skin files for the installation of skins and administration templates are also found in the same directory.
  12. var (directory)
    Var folder mainly manages the caching of Magento and Sessions along with backup for the database and exports. The directory also manages the error report caching.

There are other parts of Magento which certainly are worth mentioning, however understanding and digesting the above information is more than enough to say “I know how Magento Works”.

Do let us know how you found our Webbing Wednesday Week #2. We shall wait your comments and responses.

Nisarg Mehta Nisarg Mehta

Nisarg Mehta, CEO & Chairman of Techtic Solutions, is the vision of the company. Nisarg is active in operations in his daily routine as he is one of the key decision makers in terms of technological advancements of the company. He is a friendly leader with hardworking, motivating, visionary and passionate personality.

Join over 10,000 people who
love best articles, and tips.

Relevant Blog

7 Benefits of M-Commerce for business
Shreyansh Shah

How Mobile Commerce can increase sales and customer engagement?

Published on Jun 8, 2020 by Shreyansh Shah

While most eCommerce businesses now have a mobile responsive website, those with a mobile app are deriving a three times higher conversion rate. As an […]

Read More
Start A Project

Let's Start With Discovery Session!

Please share your contact information, for us to connect with you and offer you a free discovery session about your digital product.