New developers to Magento can find it a puzzling system in terms of system architecture. In this article I hope to shed some light on some of the key directories in Magento and what they do so any Magento developers out there aren’t quite as confused when unzipping their first set of Magento install files.
Here’s seven key things you need to know the location of at some point when developing with Magento and the directories that they are stored in.
The templates file
/app/design/ is the core storage folder for template files. With it breaking down into adminhtml/ for administration templates, frontend/ for frontend templates and install/ for installation templates.
Within these you’ll find your default template set aptly named default. In your template set folder are your individual theme folders that come with Magento.
layout, locale and template are the core directories that contain the files that make up your themes.
The skin files (resources, components, resources)
Language files and e-mail templates
/app/locale/ is your core directory. With sub-directories for each language set installed for the store. You will find .csv files for each of the modules installed on the system relating to their translations. You’ll find the Magento e-mail templates in /template/email/ within your language directory in /app/locale/.
/app/etc/ contains all configuration files for Magento. From the local.xml file which contains your database configuration, amongst other things. To your modules/ folder which contains the declaration of modules in the system.
Local, core and community modules
All modules for functionality are stored in /app/code/ and are broken down into the following folders:
- community – for modules installed via Magento Connect.
- core – for modules that come with Magento by default.
- local – usually for locally developed modules
All images uploaded to the system as well as the images resized dynamically by the system are stored in media/.
When importing media files via system profiles (Magento’s name for batch processing), /media/import/ will be your folder to place the images for the products.
The var directory
The var directory is used for several functions in the system:
- Backups are exported to backups/ by the built in system backup tool.
- The system cache is stored in both cache/ and session/ folders.
- Data import for default system data import profiles is set to import/.
- Data export for default system data export profiles is set to export/.
Hopefully this has given you a good indication as to the important directories in Magento’s file structure. I hope you can now go away and navigate around Magento’s default folders with ease.