Knowledge Base Guide

PrestaShop Local Development: XAMPP, WAMP, Docker & Linux Setup

Complete guide to setting up a local PrestaShop development environment — XAMPP, WAMP, MAMP, Docker, native Linux, plus Windows vs Linux comparison for developers.

Why Develop Locally?

Every experienced PrestaShop developer has a story about "quickly testing something" on a live store and breaking the checkout or locking themselves out of the back office. Local development eliminates that entire category of disaster.

  • Safety: Test theme changes, module installations, and PHP upgrades without any risk to your live store.
  • Speed: No FTP uploads, no hosting panel waits. Change a file, refresh the browser, see the result instantly.
  • Offline work: Develop on a train, in a cafe without WiFi, or during a hosting outage.
  • Multi-version testing: Run PrestaShop 1.7, 8.x, and 9.x simultaneously. Test a module across all versions in one afternoon.
  • Debugging tools: Use Xdebug for step-through debugging, enable full error reporting, profile slow queries — impossible on shared hosting.
If you are modifying any PHP file directly on your live server, you are taking unnecessary risks. A local environment takes 30 minutes to set up and saves you from the 3 AM emergency that will otherwise come eventually.

Windows vs Linux vs macOS — An Honest Comparison

We are Linux developers and will not pretend otherwise. But we respect every platform and will give you an honest assessment.

Windows

XAMPP and WAMP make it easy to get started. For occasional testing, Windows works fine. However, PrestaShop was designed for Linux servers, which introduces subtle friction:

  • File permissions: PrestaShop uses Unix-style permissions (chmod 755/644). Windows has a different model — XAMPP grants full permissions to everything, masking bugs that appear on your Linux server.
  • Case sensitivity: MyModule.php and mymodule.php are the same file on Windows but different files on Linux. Modules can work locally and fail on deployment.
  • Line endings: Windows CRLF vs Linux LF can cause "headers already sent" errors or break shell scripts.
  • Performance: Windows Defender actively scans PHP files during execution, adding measurable overhead.

Linux

The closest match to your production environment. Same file system, same permissions, same tools.

  • Native Docker: No virtualization layer. Instant startup, native file system performance.
  • Free and open source: PHP, MySQL, Apache, Nginx, Composer, Node.js, Git, VS Code — all free.
  • Production parity: Bugs you find locally exist on the server. Bugs you miss locally will (usually) not surprise you in production.

macOS

A solid middle ground — Unix-based, so permissions and paths work like Linux. Docker runs through a lightweight VM (some I/O overhead). Homebrew gives easy access to all tools: brew install php@8.2 mysql composer.

Our Recommendation

For full-time PrestaShop development, use Linux — specifically Ubuntu (easiest) or Arch Linux (most control). We personally run Arch Linux with KDE Plasma — everything we use is open source and legally free.

For occasional testing as a store owner, XAMPP on Windows is perfectly fine. Do not let anyone tell you to switch operating systems just to test a module.

The "best" development environment is the one you actually use. A Windows XAMPP setup that you use every day beats a perfect Linux Docker setup that you never got around to configuring.

Option 1: XAMPP (Windows, macOS, Linux)

XAMPP bundles Apache, MariaDB, PHP, and phpMyAdmin into a single installer. For someone who wants PrestaShop locally with minimal fuss, this is the fastest path.

Installation

1. Download from apachefriends.org. Choose the PHP version matching your PrestaShop: 7.2-7.4 for PS 1.7, 8.0-8.2 for PS 8.x, 8.1-8.3 for PS 9.x.

2. Install (Windows: C:\xampp, macOS: /Applications/XAMPP). Start Apache and MySQL from the control panel.

3. Create a database at http://localhost/phpmyadmin — click "New", name it prestashop, select utf8mb4_general_ci.

4. Download PrestaShop from GitHub releases. Extract to C:\xampp\htdocs\prestashop\.

5. Visit http://localhost/prestashop and follow the installer (database server: localhost, user: root, password: empty). Delete the install/ directory when done.

Required php.ini Tweaks

Find php.ini via XAMPP control panel > Apache > Config:

memory_limit = 512M              ; default 128M is not enough
max_execution_time = 300         ; default 30s too short for imports
upload_max_filesize = 64M        ; default 2M too small for module ZIPs
post_max_size = 64M
max_input_vars = 20000           ; default 1000 — critical for PS admin forms

Uncomment required extensions by removing the ;: intl, gd, zip, curl, mbstring. Restart Apache.

Common XAMPP Problems

Port 80 conflict: Skype or IIS is using port 80. Change Listen 80 to Listen 8080 in httpd.conf, then access at http://localhost:8080.

"max_input_vars" errors: The #1 XAMPP issue with PrestaShop. Settings don't save, combinations are lost. Set to 20000 in php.ini.

White page: Check C:\xampp\apache\logs\error.log — usually a missing extension or insufficient memory.

Option 2: WAMP (Windows Only)

WAMP's killer feature is built-in PHP version switching — left-click the tray icon > PHP > Version, and switch instantly.

Setup

1. Download from wampserver.aviatechno.net (64-bit). Install Visual C++ Redistributables first — WAMP requires them.

2. Install to C:\wamp64. The tray icon turns green when all services are running.

3. Add PHP versions from the WAMP addons page. They integrate automatically.

Virtual Hosts

WAMP includes a virtual host manager: tray icon > Your VirtualHosts > VirtualHost Management. Set up ps17.local and ps8.local pointing to different directories. WAMP updates your hosts file and Apache config automatically.

WAMP's PHP version switcher changes the version server-wide. You cannot run PHP 7.4 and 8.2 simultaneously for different virtual hosts — for that, you need Docker.

Option 3: MAMP (macOS)

MAMP is the Mac equivalent of XAMPP. The free version gives you one document root with Apache, PHP, and MySQL. MAMP Pro ($59) adds multiple hosts, SSL, PHP version switching, and Nginx.

Quick setup: Download from mamp.info, start services, create a database via phpMyAdmin, place PrestaShop in /Applications/MAMP/htdocs/prestashop/, access at http://localhost:8888/prestashop.

If Docker performance on your Mac is unacceptable (common with mounted volumes), use Homebrew instead: brew install php@8.2 mysql composer gives you native speed.

Option 4: Native Linux Setup

Install and configure each component directly. Most control, best performance, closest to production.

Ubuntu / Debian

sudo apt update
sudo apt install apache2
sudo apt install php8.2 php8.2-fpm php8.2-mysql php8.2-gd php8.2-intl \
  php8.2-curl php8.2-zip php8.2-xml php8.2-mbstring php8.2-bcmath
sudo apt install mysql-server
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

Arch Linux: sudo pacman -S apache php php-fpm php-gd php-intl php-sodium mariadb composer, then initialize MariaDB and enable services with systemctl.

Apache Virtual Host

Create /etc/apache2/sites-available/ps8.local.conf with a VirtualHost pointing ServerName ps8.local and DocumentRoot to your PrestaShop directory. Set AllowOverride All and proxy PHP to FPM. Enable with sudo a2ensite ps8.local.conf && sudo a2enmod rewrite proxy_fcgi && sudo systemctl reload apache2. Add 127.0.0.1 ps8.local to /etc/hosts.

File Permissions

Set ownership to www-data, directories to 755, files to 644, and writable directories (var/, cache/, img/, upload/, config/) to 775. File permissions are the #1 stumbling block on Linux — if PrestaShop shows a white page, check the Apache error log for "Permission denied."

Option 5: Docker — Recommended for Serious Development

Each PrestaShop version runs in its own container with its own PHP and MySQL. Nothing conflicts, nothing leaks. See our full Docker guide for detailed instructions.

Quick docker-compose.yml

services:
  prestashop:
    image: prestashop/prestashop:8.2
    ports: ["8085:80"]
    environment:
      DB_SERVER: db
      DB_USER: prestashop
      DB_PASSWD: prestashop
      DB_NAME: prestashop
      PS_DOMAIN: localhost:8085
      ADMIN_MAIL: admin@yourshop.com
      ADMIN_PASSWD: your_secure_password
    volumes: [ps-files:/var/www/html]
    depends_on: [db]
  db:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: root_pass
      MYSQL_DATABASE: prestashop
      MYSQL_USER: prestashop
      MYSQL_PASSWORD: prestashop
    volumes: [db-data:/var/lib/mysql]
volumes:
  ps-files:
  db-data:

Start: docker compose up -d. Access at http://localhost:8085.

We run over 25 PrestaShop containers on a single server — PS 1.6 through 9.1 — for module development and testing. Docker is the only practical way to manage that. Even with two or three versions, it saves you from dependency conflicts.

Post-Setup: Configuration for All Methods

Required PHP Extensions

PrestaShop will refuse to install or malfunction without these:

  • intl — currency formatting, locale handling (most commonly missing)
  • gd — image processing, thumbnails, watermarks
  • curl — payment gateways, webservice API
  • mbstring — UTF-8 string handling
  • zip — module installation from ZIPs
  • xml — import/export, webservice
  • pdo_mysql — database connectivity
  • opcache — bytecode caching (technically optional, practically mandatory)

Verify: php -m | grep intl or create a phpinfo() page (delete it afterward).

Enabling Friendly URLs

Apache: sudo a2enmod rewrite and set AllowOverride All in your vhost. Nginx: Use try_files $uri $uri/ /index.php?$args;. Then enable in Back Office > Shop Parameters > Traffic & SEO.

Email Testing with Mailpit

Capture all outgoing email locally instead of sending real emails:

docker run -d --name mailpit -p 8025:8025 -p 1025:1025 axllent/mailpit

Configure PrestaShop SMTP: server localhost, port 1025, no encryption, no authentication. View emails at http://localhost:8025.

IDE Setup

VS Code (free): Install PHP Intelephense + PHP Debug extensions. Configure Xdebug with port: 9003 and pathMappings pointing your container path to your workspace folder. PHPStorm (paid): Built-in PHP, Xdebug, database tools, and Docker integration. Worth it if PHP is your profession.

Importing a Live Store Locally

Testing with your actual products, theme, and modules catches real bugs that a fresh install cannot.

Database Export and Import

# Export from production (via SSH — phpMyAdmin times out on large DBs)
mysqldump -u db_user -p database_name > prestashop_backup.sql

# Create local database
mysql -u root -p -e "CREATE DATABASE prestashop_local CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"

# Import
mysql -u root -p prestashop_local < prestashop_backup.sql

Copy Files and Update Configuration

Download critical directories (img/, modules/, themes/, config/, override/, upload/) via rsync: rsync -avz user@server:/path/to/prestashop/ /local/prestashop/

-- Change domain to local
UPDATE ps_shop_url SET domain = 'localhost:8080', domain_ssl = 'localhost:8080' WHERE id_shop_url = 1;

-- Disable SSL
UPDATE ps_configuration SET value = '0' WHERE name = 'PS_SSL_ENABLED';
UPDATE ps_configuration SET value = '0' WHERE name = 'PS_SSL_ENABLED_EVERYWHERE';

Edit app/config/parameters.php (PS 1.7/8.x) or config/settings.inc.php (PS 1.6) with local database credentials. Clear cache: rm -rf var/cache/*.

After importing, create a new admin account for local use instead of using production credentials. This prevents accidental changes from affecting production if your workflow slips.

Common Local Development Problems

White Screen After Install

Always check the error log first — the answer is almost always there:

# Apache: tail -50 /var/log/apache2/error.log
# XAMPP: C:\xampp\apache\logs\error.log
# PrestaShop: tail -50 var/logs/dev.log

Missing extension: Log shows Call to undefined function — install the named extension. Memory: Log shows Allowed memory size exhausted — increase memory_limit. Wrong PHP version: PS 8.x on PHP 7.4 gives type errors — check php -v.

Cannot Access Admin Panel

mod_rewrite not enabled or .htaccess not being read. Enable rewrite: sudo a2enmod rewrite. Set AllowOverride All in your vhost. For XAMPP: change AllowOverride None to AllowOverride All in httpd.conf.

Extremely Slow on Windows

Antivirus: Add your XAMPP and PrestaShop directories to Windows Defender exclusions (Settings > Virus & threat protection > Exclusions).

Docker on WSL2: Store files inside WSL2's native filesystem (/home/you/prestashop/), not on a mounted Windows drive (/mnt/c/...) — the performance difference is dramatic.

Images Not Loading

Missing GD: Install php-gd. Permissions: chown -R www-data:www-data img/. Imported store: Regenerate thumbnails from Back Office > Design > Image Settings.

Module Installation Fails

"Cannot upload": Increase upload_max_filesize and post_max_size to 64M. "Cannot unzip": Install php-zip. "Permission denied": chmod 775 modules/. "Class not found": Delete var/cache/*/class_index.php.

Database Connection Refused

MySQL is not running — check with sudo systemctl status mysql and start if needed. For "Access denied," verify credentials match between your config file and MySQL user grants.

Development Workflow Tips

Enable debug mode: In config/defines.inc.php, set define('_PS_MODE_DEV_', true); for stack traces and SQL details. Never enable on production.

Disable cache: Back Office > Advanced Parameters > Performance — set Smarty cache to "No" and CCC off. Caching hides your changes.

Use Git: git init && git add . && git commit -m "Initial structure" in your module directory. Every change is tracked. git diff shows what changed, git checkout -- file.php reverts a file.

Quick Reference: Version Requirements

  • PS 1.6.1.x: PHP 5.6-7.1, MySQL 5.0-5.7
  • PS 1.7.0-1.7.6: PHP 7.1-7.3, MySQL 5.5-5.7
  • PS 1.7.7-1.7.8: PHP 7.2-7.4, MySQL 5.6-8.0
  • PS 8.0-8.1: PHP 8.0-8.1, MySQL 5.7-8.0
  • PS 8.2: PHP 8.1-8.2, MySQL 5.7-8.0 / MariaDB 10.x
  • PS 9.x: PHP 8.1-8.3, MySQL 8.0 / MariaDB 10.11+
Always check the official system requirements for your exact version — they change with minor releases.

What Next?

  • Module development: The official developer docs cover module structure and the hook system.
  • Set up Xdebug: Step-through debugging is the single biggest productivity gain for PHP development.
  • Explore Docker: If you outgrow XAMPP/WAMP, our Docker guide covers multi-version setups.
  • Safe deployment: See our staging site guide and backup guide for the path from local to production.

The investment in a proper local environment pays dividends every single day. Thirty minutes of setup saves hours of debugging and prevents production incidents.

More guides available

Browse our knowledge base for more practical PrestaShop tutorials, or reach out if you need help.

Loading...
Back to top