{"id":16051,"date":"2018-06-19T13:17:15","date_gmt":"2018-06-19T11:17:15","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=16051"},"modified":"2021-02-18T09:33:06","modified_gmt":"2021-02-18T07:33:06","slug":"directory-structure-and-locating-different-files-in-magento2","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html","title":{"rendered":"Directory Structure &#038; Different Types of Files in Magento 2"},"content":{"rendered":"\n<p>In this article, we will take a look at Magento&rsquo;s directory structure, which consists of the following 3 types:&nbsp;Basic&nbsp;structure, Module structure and Design structure. Each structure has its own list of directories. First, let&rsquo;s talk about the standard directories of Basic structure in Magento 2.<\/p>\n<p><!--more--><\/p>\n<h2><strong>Basic structure<\/strong><\/h2>\n<p>Basic structure will include all the standard directories in Magento 2:<\/p>\n<ul>\n<li>app<\/li>\n<li>bin<\/li>\n<li>dev<\/li>\n<li>lib<\/li>\n<li>pub<\/li>\n<li>var<\/li>\n<li>vendor<\/li>\n<\/ul>\n<ol>\n<li><strong>App&nbsp;<\/strong>is a directory recommended for the development of Magento components. It consists of:\n<ul>\n<li><em>design<\/em>&nbsp;is used for the themes of the webstore;<\/li>\n<li><em>code<\/em>&nbsp;contains the installed modules (there is an option of installing via the composer. In this case the files will be located in the \/vendor directory). We will take a look at this directory later (in the module structure);<\/li>\n<li><em>etc&nbsp;<\/em>contains the environment settings for Magento;<\/li>\n<li style=\"text-align: left;\">i18n is used to install language packs. Here is an example of a language pack:<br>\n<a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image92.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy size-full wp-image-16052\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image92.png\" alt=\"image9\" width=\"210\" height=\"159\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a><i><\/i><\/li>\n<\/ul>\n<\/li>\n<li><strong>bin<\/strong>&nbsp;is where Magento (CLI) executable files are located;<\/li>\n<li><strong>dev<\/strong><em>&nbsp;<\/em>is a directory for test Magento scripts (read more on this in <a href=\"https:\/\/devdocs.magento.com\/guides\/v2.0\/mtf\/mtf_quickstart.html\" target=\"_blank\" rel=\"noopener\">Magento Devdocs<\/a>)<\/li>\n<li><strong>lib<\/strong><em>&nbsp;<\/em>is used for Magento library files;<\/li>\n<li><strong>pub<\/strong><em>&nbsp;<\/em>directory is used to access the static Magento files. It contains the following directories:<br>\n<strong>errors<\/strong><em>&nbsp;<\/em>contains error logs;<br>\n<strong>media<\/strong><em>&nbsp;<\/em>contains all media files (of products, pages, etc.);<br>\n<strong>static<\/strong><em>&nbsp;<\/em>contains generated files of Magento themes. This directory can indicate <em>web root<\/em>&nbsp;in&nbsp;<em>nginx<\/em> config Magento;<\/li>\n<li style=\"text-align: left;\"><strong>var<\/strong><em>&nbsp;<\/em>contains all temporary files. It consists of:<br>\n<a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image13.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy size-full wp-image-16053\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image13.png\" alt=\"image13\" width=\"214\" height=\"147\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a>\n<ol>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>cache contains the cache files of front Magento pages;<\/li>\n<li>log contains all the Magento logs;<\/li>\n<li>report contains the Magento error files, which call the 503 page, as well as api request errors;<\/li>\n<li>session contains the session files;<\/li>\n<li>view_preprocessed contains the generated theme files;<\/li>\n<li>generation contains the generated php files (in Magento 2.2 it was moved to the Magento root directory);<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<li><strong>vendor<\/strong><span style=\"font-weight: 400;\"> contains the core of the framework. Here is where additional modules can be installed. All operations with this directory are made through the composer.<\/span><\/li>\n<\/ol>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/store.belvg.com\/\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/06\/Magento-store.belvg_.com_.png\" width=\"481\" height=\"480\" alt=\"Magento store.belvg.com\" class=\"module_image\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Extensions<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Extensions<\/p><a href=\"https:\/\/store.belvg.com\/\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the store<\/span><\/a><\/div><\/div><\/div>\n<h2><strong>Module structure<\/strong><\/h2>\n<p>Based on the information above, the modules can be located in <em>\/app\/code<\/em> and in <em>\/vendor<\/em> directories (depending on the type of installation).<\/p>\n<p>The recommended way to install third-party modules is <em>\/app\/code.<\/em> The module files are arranged according to the following pattern: <em>app\/code\/{vendor}\/{module_name}.<\/em><\/p>\n<p>In the <em>\/vendor<\/em> directory (modules are installed here via the composer), the modules are usually created using the <em>{vendor}\/module-{module_name}<\/em> template, but not always, since the settings of the main files are specified in the composer.json file of the module itself (for example, <em>vendor\/magento\/framework\/composer.json<\/em>).<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image16.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16054\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image16.png\" alt=\"image16\" width=\"211\" height=\"277\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a><\/p>\n<p>The following directories and files can be located within the directory with the module:<\/p>\n<ol>\n<li><strong>etc<\/strong> is an obligatory directory, which stores module settings, its classes, routes, system settings (their location in the database and on the admin part of the site);<\/li>\n<li><strong>Block<\/strong> is a directory with php files of blocks;<\/li>\n<li><strong>Model<\/strong> is a directory with models and module resources;<\/li>\n<li><strong>Controller<\/strong>&nbsp;contains all the module controllers. Here is a template for the controllers: <em>Controller\/{uri_1}\/{uri_2}<\/em>. For example, for the <em>{front_controller_name}\/belvg\/test\/<\/em> request the <em>Controller\/Belvg\/Test.php<\/em> file will be requested;<\/li>\n<li><strong>Helper<\/strong> contains auxiliary classes;<\/li>\n<li><strong>Console<\/strong> usually contains php classes for CLI calls via <em>\/bin\/<\/em>magento;<\/li>\n<li><strong>Api<\/strong>&nbsp;is a directory containing the Api interface class;<\/li>\n<li><strong>Observer<\/strong> contains php files of observer classes;<\/li>\n<li><strong>i18n<\/strong> contains localization packages;<\/li>\n<li><strong>Setup<\/strong> is a directory with installation files for the module (databases, files, etc.). Usually, one of the following files is used: <em>InstallSchema.php<\/em> (for initial installation of the database structure), <em>InstallData.php<\/em> (for initial installation of data in the database), <em>UpgradeData.php<\/em> (for updating the database data), <em>UpgradeSchema.php<\/em> (for updating the database structure);<\/li>\n<li><strong>Plugins<\/strong> is a directory containing plugins&rsquo; php files;<\/li>\n<li><strong>Ui<\/strong>&nbsp;contains php files of Ui components;<\/li>\n<li><strong>registration.php<\/strong> is a mandatory file, which registres modules in Magento;<\/li>\n<li><strong>view<\/strong>&nbsp;contains template files, CSS and JS files, module&rsquo;s media files. The internal structure of this directory is divided into adminhtml, frontend, base (base is responsible for general files between scope). They are responsible for the display area. Inside adminhtml, frontend and base is the same file structure.<\/li>\n<\/ol>\n<p>Here is an approximate content of the two directories:<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16056\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image7.png\" alt=\"image7\" width=\"196\" height=\"242\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a>Now let&rsquo;s take a look at the internal structure of these directories:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>email<\/em>&nbsp;contains email templates, e.g., <em>order_new.html<\/em>;<\/li>\n<li><em>layout&nbsp;<\/em>contains files for customizing the page templates. It is usually formed according to the following pattern: <em>{front_controller_name}\/{uri_1}\/{uri_2}\/<\/em> (see the Controller module directory);<\/li>\n<li><em>templates<\/em> contains template files (phtml), used by this module;<\/li>\n<li><em>page_layout<\/em> stores files, describing page types in Magento (1column.xml, 2columns-left.xml, etc.);<\/li>\n<li><em>ui_component<\/em> stores the .xml files that contain a description of ui components of the separate pages;<\/li>\n<li><em>web<\/em>&nbsp;contains static files, template files for knockoutJS, JS, theme files, media files. Here is an example of this directory;<br>\n<a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image103.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy size-full wp-image-16059 alignleft\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image103.png\" alt=\"image10\" width=\"125\" height=\"82\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a><\/li>\n<li><em>css&nbsp;<\/em>is respoonsible for style files;<\/li>\n<li><em>images<\/em> contains media files of the module;<\/li>\n<li><em>js&nbsp;<\/em>contaains JavaScript files.<\/li>\n<\/ul>\n<\/li>\n<li>\n<\/ol>\n<div class=\"content_sales_info\" style=\"background-image: url(https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/03\/Sales_background.png\"><img width=\"65\" height=\"65\" src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2015\/11\/Andrey_Dubina.png\" alt=\"Andrey_Dubina\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><div class=\"content_part\"><h3 class=\"title\">Partner With Us <\/h3><span class=\"sales_content_text\">Let's discuss how to grow your business. Get a Free Quote.<\/span><\/div> <a class=\"call-to-action\" href=\"https:\/\/belvg.com\/contact?utm_source=blog&amp;utm_campaign=sales_block&amp;utm_content=middle\" target=\"_blank\" rel=\"noopener\">Talk to Andrey<\/a><\/div>\n<h2><strong>Design structure<\/strong><\/h2>\n<p>Magento design files are located here: <em>app\/design\/ <\/em><\/p>\n<p>They are divided into&nbsp;<em>adminhtml<\/em> (responsible for the admin part of the site) &#1080;&nbsp;<em>frontend<\/em> (responsible for the front end part).<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image18.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16063\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image18.png\" alt=\"image18\" width=\"177\" height=\"98\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a><\/p>\n<p>Inside, the theme files are arranged according to the following pattern: <em>{vendor}\/{theme_name}:<\/em><\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image121.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16064\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image121.png\" alt=\"image12\" width=\"139\" height=\"58\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a><\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/magento-custom-development.png\" width=\"120\" height=\"120\" alt=\"magento custom development\" class=\"module_image\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Custom Development<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Custom Development<\/p><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<p>The directory with the theme (for example BelVG\/base) contains the following directories and files:<\/p>\n<ol>\n<li><strong>{Vendor}_{Module_name}<\/strong> is a common template for override module files (both standard and third-party), e.g. <em>BelVG_CustomModule<\/em>. The structure of the inner directories and files is no different from the <em>view\/{scope}\/<\/em> module file (for example, <em>app\/code\/BelVG\/CustomModule\/view\/frontend\/layout\/belvg_custom_module.xml<\/em>);<\/li>\n<li><strong>etc<\/strong> contains the theme settings (e.g. <em>view.xml<\/em>). This directory may be missing and the parent theme settings will be used;<\/li>\n<li><strong>media<\/strong> is a directory with media files of the theme;<\/li>\n<li><strong>web<\/strong> contains css<em>\/js\/fonts<\/em> files for the theme;<\/li>\n<li><strong>theme.xml<\/strong> file is a required file with the settings of the theme itself. Inside it describes the name of the theme and its parent;<\/li>\n<li><strong>requirejs-config.js<\/strong> contains requireJS config;<\/li>\n<li><strong>registration.php<\/strong> is a required file that registers a theme in Magento;<\/li>\n<li><strong>composer.json<\/strong> is a composer file for downloading a theme.<\/li>\n<\/ol>\n<h2><strong>Finding the files responsible for a certain<\/strong><strong>&nbsp;functionality<\/strong><\/h2>\n<p>To search for the files responsible for particular functionality, you can use the module configuration files (<em>di.xml<\/em>) that describe the file structure. You can also use the layout description of the module\/theme files to search for specific blocks, or use hints that can be included in the store settings (Stores &#10132; Configuration &#10132; Advanced &#10132; Developer).<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image17.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16065\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/image17.png\" alt=\"image17\" width=\"751\" height=\"233\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><\/a><\/p>\n<p>To find the controllers, it&rsquo;s most convenient to use the directory structure (since the controllers are located in the module directory using the following template: <em>Controllers\/{uri_1}\/{uri_2}\/)<\/em>. Front Name for the controller is specified in <em>etc\/{scope}\/routes.xml<\/em>, so it is easy to find it (using file search).<\/p>\n<p>To find the model&rsquo;s functionality, you can use the well-known model namespace (for example, in <em>__construstor<\/em> you specify the namespace of the connected classes) by searching in the previously known file location pattern.<\/p>\n<p>That is how Magento 2 directory structure looks like, hope it was helpful. Leave your&nbsp;questions and comments in the section below and I will get in touch as soon as possible.<\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-webdesign\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/magento-webdesign-1.png\" width=\"100\" height=\"100\" alt=\"magento webdesign\" class=\"module_image\" title=\"Directory Structure &amp; Different Types of Files in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Webdesign<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Webdesign<\/p><a href=\"https:\/\/belvg.com\/magento-webdesign\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"The directory structure and the location of files in Magento 2","protected":false},"author":82,"featured_media":16072,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[474,491,524],"tags":[],"class_list":["post-16051","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-ecommerce","category-magento-2","category-magento-speed-optimization","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Learn about 3 types of Magento 2 directory structure and their standard directories and how to find the files responsible for certain functionality.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Andrey Litvin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#article\",\"name\":\"Directory Structure & Types of Files in Magento 2 | BelVG Blog\",\"headline\":\"Directory Structure &#038; Different Types of Files in Magento 2\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/Describing_Directory_Structure_and-2.jpg\",\"width\":770,\"height\":433},\"datePublished\":\"2018-06-19T13:17:15+02:00\",\"dateModified\":\"2021-02-18T09:33:06+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#webpage\"},\"articleSection\":\"ECOMMERCE, Magento 2, Magento Speed Optimization, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/ecommerce#listItem\",\"name\":\"ECOMMERCE\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/ecommerce#listItem\",\"position\":2,\"name\":\"ECOMMERCE\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/ecommerce\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#listItem\",\"name\":\"Directory Structure &#038; Different Types of Files in Magento 2\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#listItem\",\"position\":3,\"name\":\"Directory Structure &#038; Different Types of Files in Magento 2\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/ecommerce#listItem\",\"name\":\"ECOMMERCE\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin\",\"name\":\"Andrey Litvin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Andrey Litvin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html\",\"name\":\"Directory Structure & Types of Files in Magento 2 | BelVG Blog\",\"description\":\"Learn about 3 types of Magento 2 directory structure and their standard directories and how to find the files responsible for certain functionality.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/Describing_Directory_Structure_and-2.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html\\\/#mainImage\",\"width\":770,\"height\":433},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/directory-structure-and-locating-different-files-in-magento2.html#mainImage\"},\"datePublished\":\"2018-06-19T13:17:15+02:00\",\"dateModified\":\"2021-02-18T09:33:06+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Directory Structure & Types of Files in Magento 2 | BelVG Blog","description":"Learn about 3 types of Magento 2 directory structure and their standard directories and how to find the files responsible for certain functionality.","canonical_url":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#article","name":"Directory Structure & Types of Files in Magento 2 | BelVG Blog","headline":"Directory Structure &#038; Different Types of Files in Magento 2","author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/Describing_Directory_Structure_and-2.jpg","width":770,"height":433},"datePublished":"2018-06-19T13:17:15+02:00","dateModified":"2021-02-18T09:33:06+02:00","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#webpage"},"articleSection":"ECOMMERCE, Magento 2, Magento Speed Optimization, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/ecommerce#listItem","name":"ECOMMERCE"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/ecommerce#listItem","position":2,"name":"ECOMMERCE","item":"https:\/\/belvg.com\/blog\/category\/ecommerce","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#listItem","name":"Directory Structure &#038; Different Types of Files in Magento 2"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#listItem","position":3,"name":"Directory Structure &#038; Different Types of Files in Magento 2","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/ecommerce#listItem","name":"ECOMMERCE"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author","url":"https:\/\/belvg.com\/blog\/author\/andrey-litvin","name":"Andrey Litvin","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Andrey Litvin"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#webpage","url":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html","name":"Directory Structure & Types of Files in Magento 2 | BelVG Blog","description":"Learn about 3 types of Magento 2 directory structure and their standard directories and how to find the files responsible for certain functionality.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/06\/Describing_Directory_Structure_and-2.jpg","@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html\/#mainImage","width":770,"height":433},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html#mainImage"},"datePublished":"2018-06-19T13:17:15+02:00","dateModified":"2021-02-18T09:33:06+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"16051","title":"Directory Structure &amp; Types of Files in Magento 2 | #site_title","description":"Learn about 3 types of Magento 2 directory structure and their standard directories and how to find the files responsible for certain functionality.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:37:08","updated":"2026-11-03 18:37:08"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/ecommerce\" title=\"ECOMMERCE\">ECOMMERCE<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDirectory Structure &amp; Different Types of Files in Magento 2\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"ECOMMERCE","link":"https:\/\/belvg.com\/blog\/category\/ecommerce"},{"label":"Directory Structure &#038; Different Types of Files in Magento 2","link":"https:\/\/belvg.com\/blog\/directory-structure-and-locating-different-files-in-magento2.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=16051"}],"version-history":[{"count":6,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16051\/revisions"}],"predecessor-version":[{"id":25912,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16051\/revisions\/25912"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/16072"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=16051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=16051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=16051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}