Magento 2 Directory Structure


Magento 2 Directory Structure : Magento 2 folder structure is changed significantly. Here in this tutorial we are going to explain the magento 2 folder structure.


Magento 2 Directory Structure

Let us go step by step to understand the new directory struture.

Magento 2 Directory Structure : Root

The root folder contains the following folders and files-

Magento 2 Directory Structure

Magento 2 app folder –

App folder in magento 2 looks like this –

Magento 2 app folder

code folder contains modules and design contains the themes.

In magento 2.0 the app/etc/local.xml is replaced by app/etc/env.php. This contains the database settings & Admin names etc. The folder modules is also removed from magento2.

\app\etc now looks like this –

Magento 2 etc folder

Magento 2 : Database Settings & Admin Name Settings

<?php
return array (
  'backend' => 
  array (
    'frontName' => 'admin',
  ),
  'install' => 
  array (
    'date' => 'Fri, 11 Mar 2016 05:10:24 +0000',
  ),
  'crypt' => 
  array (
    'key' => '68be9e846774564a7ef08545dab04ceb',
  ),
  'session' => 
  array (
    'save' => 'files',
  ),
  'db' => 
  array (
    'table_prefix' => '',
    'connection' => 
    array (
      'default' => 
      array (
        'host' => 'localhost',
        'dbname' => 'magento2',
        'username' => 'root',
        'password' => '',
        'active' => '1',
      ),
    ),
  ),
  'resource' => 
  array (
    'default_setup' => 
    array (
      'connection' => 'default',
    ),
  ),
  'x-frame-options' => 'SAMEORIGIN',
  'MAGE_MODE' => 'default',
  'cache_types' => 
  array (
    'config' => 1,
    'layout' => 1,
    'block_html' => 1,
    'collections' => 1,
    'reflection' => 1,
    'db_ddl' => 1,
    'eav' => 1,
    'config_integration' => 1,
    'config_integration_api' => 1,
    'full_page' => 1,
    'translate' => 1,
    'config_webservice' => 1,
  ),
);
?>

You can add the configurations as per your requirement.


Advertisements

Add Comment

📖 Read More