Site icon PrestaShop | General Knowledge

PrestaShop Folder Structure

The main PrestaShop folder structure (PrestaShop 8.x) looks like this:

prestashop/
│
├── admin-dev/          # Back Office (admin panel)
├── app/                # Configuration and resources
├── bin/                # Console commands
├── classes/            # Core PHP classes
├── config/             # Configuration files
├── controllers/        # Front and admin controllers
├── docs/               # Documentation
├── download/           # Downloadable products
├── img/                # Images (products, categories, manufacturers)
├── install/            # Installation files
├── js/                 # JavaScript files
├── mails/              # Email templates
├── modules/            # Installed modules
├── override/           # Core overrides
├── pdf/                # PDF templates
├── src/                # Symfony source code
├── themes/             # Front-office themes
├── translations/       # Language translations
├── upload/             # Customer uploads
├── var/                # Cache and logs
├── vendor/             # Composer dependencies
├── webservice/         # Webservice API
└── index.php

Important Directories

FolderPurpose
modules/Install custom and third-party modules
themes/Theme files, templates, CSS, JS
override/Override core classes and controllers
img/Product, category, manufacturer images
mails/Email templates
translations/Language files
var/cache/Cache files (safe to clear)
var/logs/Error and debug logs
config/Database and shop configuration
src/Modern Symfony-based code
controllers/Front-office and Back-office controllers

Common Development Locations

Module Development

modules/
└── mymodule/
    ├── mymodule.php
    ├── config.xml
    ├── logo.png
    ├── controllers/
    ├── views/
    ├── translations/
    └── upgrade/

Theme Development

themes/
└── classic/
    ├── templates/
    ├── assets/
    │   ├── css/
    │   ├── js/
    │   └── img/
    └── modules/

Cache Management

To manually clear cache:

var/cache/prod/
var/cache/dev/

You can delete the contents of these folders (not the folders themselves) when troubleshooting module or theme changes.

Hooks and Templates

If you’re developing modules, the modules/, themes/, override/, var/cache/, and config/ folders are the most important ones to understand.

Exit mobile version