Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.
You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page
Here’s the typical directory structure of a PrestaShop install:
.
├── admin
├── app
├── bin
├── cache
├── classes
├── config
├── controllers
├── docs
├── download
├── img
├── install
├── js
├── localization
├── mails
├── modules
├── override
├── pdf
├── src
├── templates
├── tests
├── tests-legacy
├── themes
├── tools
├── translations
├── travis-scripts
├── upload
├── var
├── vendor
└── webservice
The admin directory contains the main endpoint to access the Back Office. When accessing this folder with your browser, you will be asked your employee credentials.
.htaccess
or .htpasswd
file.This directory is named admin-dev
when using PrestaShop from source code, and is renamed automatically when you install it from a ZIP package.
It contains the following subdirectories:
/autoupgrade
: scratch directory for the 1-click upgrade module/backups
: contains database backups generated from the Back office/export
: contains data export files/filemanager
: sources for the Back office file manager/import
: contains data import files/themes
: contains the templates for two back office themes, default
and new-theme
.This directory contains the configuration for the bundles and the framework.
It contains the following subdirectories:
/config
: configuration files for database, parameters, services, etc./logs
: execution logs/Resources
: different resources for the software./test
: reservedThis directory also includes the AppKernel.php
file, which configures the Symfony application.
Contains executable binaries installed by the framework, such as the Symfony console.
Contains temporary cache files. No longer used by PrestaShop but kept for backwards compatibility.
Contains all the legacy classes, including:
Db
, Helper
, Tools
…)FrontController
, AdminController
…)Contains bootstrapping and configuration files. Unless asked, you should never edit them, as they are directly handled by PrestaShop’s installer and back office.
Contains controllers – as in Model-View-Controller (or MVC), the software architecture used by PrestaShop. Each file controls a specific part of PrestaShop.
Controllers are separated in two directories:
/admin
: contains legacy controllers for the Back Office/front
: contains controllers for the Front OfficeContains documentation files, licenses, sample import files, and more.
Contains your virtual products, which can be downloaded by the customers who bought them. Files are stored with an md5 filename.
Contains all of PrestaShop’s default images, icons and picture files – that is, those that do not belong to the theme.
It contains the following subdirectories:
/admin
: Back office images/c
: Category pictures/cms
: CMS pictures/co
: Attributes (colors) pictures/flags
: Country & language flags/genders
: Gender (Shop Parameters > Customers > Client titles) pictures/jquery-ui
: jQuery UI images/l
: Language pictures/m
: Manufacturer pictures/os
: Order state pictures/p
: Product pictures/s
: Carrier pictures/scenes
: Category scene pictures (removed since 1.6)/st
: Stores (Shop Parameters > Contact > Stores) pictures/su
: Supplier pictures/t
: Tab icons/tmp
: Temporary picturesContains all the files related to PrestaShop’s installer. This directory is named install-dev
when using PrestaShop from source code.
Contains JavaScript files that are not attached to themes. Most of them belong to the back office.
This is also where you will find the jQuery framework.
Contains all of PrestaShop’s localization packs — that is, files that contain local information such as default currencies and languages, tax rules and tax rule groups, states and measurement units in use in each country.
The CLDR database is also located in this directory.
Contains all HTML and text templates for e-mails sent by PrestaShop. Each language has its specific folder, where you can manually edit their content if you wish. PrestaShop contains a tool to edit your e-mails, located in the back office, in the Localization > Translation page.
This directory also contains Mail themes.
Contains all of PrestaShop’s modules, each in its own folder.
Contains class overrides. To learn more about this feature, read the Overrides section.
Contains all the template files (.tpl
) related to PDF file generation (invoice, delivery slips, etc.). Change these files in order to change the look of the PDF files that PrestaShop generates.
Contains the new architecture files (Core, Adapter and PrestaShop Bundle). To learn more, see Understanding the “src” folder.
Contains Twig templates for the Symfony bundles.
Contains automated tests. This directory is not included in release packages.
Tests are split in three big families:
Integration
: contains behavior and integration tests.UI
: contains end-to-end tests.Unit
: contains unit tests.Contains old automated tests currently being rewritten. This directory is not included in release packages.
Contains all the currently installed themes, each in its own folder.
It also includes the core.js
library.
Contains development tools. This directory is not included in release packages.
It contains the following subdirectories:
/assets
: Script that allow building all static assets from sources./build
: Used to create release packages./foreignkeyGenerator
: Creates foreign keys for all tables (for educational purposes only)/profiling
: Profiling tools for legacy classesContains translation resources for all the installed languages, including zip packages for any translation packs you have downloaded.
Contains Travis-specific scripts (we use Travis as our CI management system for pull requests). This directory is not included in release packages.
Contains the files that would be uploaded by clients for customizable products (for instance, a picture that a client wants to have printed on a mug).
Contains various files needed by PrestaShop for its internal operation, including cache files, log files, sessions files …
Contains various 3rd-party libraries required by PrestaShop through Composer, such as Symfony, Doctrine, Guzzle, etc.
Contains the main endpoint for the Webservice API.