Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.
You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated 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
├── 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, most notably the /translations
subdirectory which contains translation resources for all the installed languages./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
1.7.7
/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.
Since 1.7.6 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 automated tests. This directory is not included in release packages.
Tests are split in three big families:
Integration
: contains behavior and integration tests.E2E
(or UI
since
1.7.7
): 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 zip packages for the translation packs you 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.
The following root folders have been removed between 1.6 and 1.7:
/css
: contained all the CSS files that are not attached to themes – hence, these were mostly used by the PrestaShop back office, and have now been moved to the theme.css
file in the /admin/themes/new-theme/public
folder./log
: contains the log files generated by PrestaShop at various stages, for instance during the installation process.