Skip to content

← Installation and environment

Local installation

Bring PrestaShop up on your machine with Docker or XAMPP, step by step.

5 slides 5 min read
  1. PrestaShop · Instal·lació

    Local installation

    A copy on your machine to break things without fear.

    PrestaShop · Installation and environment arlaf.dev
  2. Two routes

    To set it up locally you pick one of two paths depending on your background.

    • Docker — clean, reproducible and disposable with one command.
    • XAMPP or Laragon — an all-in-one Apache + MySQL + PHP bundle.
    • Both work; pick the one you already know.
    PrestaShop · Installation and environment arlaf.dev
  3. The Docker route

    # docker-compose.yml mínim
    services:
      mysql:
        image: mariadb:11
        environment:
          MYSQL_ROOT_PASSWORD: admin
          MYSQL_DATABASE: prestashop
      prestashop:
        image: prestashop/prestashop:8
        ports: ["8080:80"]
        environment:
          DB_SERVER: mysql
          PS_INSTALL_AUTO: 1
    
    PrestaShop · Installation and environment arlaf.dev
  4. The web installer

    If you don't automate it with variables, the installer walks you through chained screens.

    • System compatibility and license.
    • Store details and admin account.
    • Database connection.
    • Install, then delete the install folder.
    PrestaShop · Installation and environment arlaf.dev
  5. Two security details

    When you finish, PrestaShop forces you to delete the install folder and renames the admin folder with a random suffix. Don't skip them, even locally.

    PrestaShop · Installation and environment arlaf.dev
Read the full note

Per desenvolupar no es toca producció: es munta una còpia a la màquina. Aquí tens les dues vies habituals i què esperar de cadascuna.

Docker, si vols entorns nets

La imatge oficial prestashop/prestashop aixeca PrestaShop amb la versió de PHP que toca, i amb un docker-compose.yml hi pots afegir la base de dades. És la via que recomano quan vols poder destruir i recrear l’entorn sense deixar rastre, o quan treballes en equip i tothom ha de tenir el mateix.

XAMPP / Laragon, si vens d’aquest món

Un paquet com XAMPP o Laragon t’instal·la Apache, MySQL i PHP de cop. Descarregues PrestaShop, el descomprimeixes dins de la carpeta web, crees una base de dades buida i obres el navegador: l’assistent fa la resta.

L’assistent i els dos detalls que la gent oblida

L’instal·lador web és una seqüència de pantalles: compatibilitat, llicència, dades de la botiga, compte d’admin i connexió a la base de dades. Quan acaba, hi ha dues coses que sempre s’han de fer i que molta gent es deixa:

  1. Esborrar la carpeta install/ — PrestaShop no arrenca fins que ho fas.
  2. La carpeta admin/ s’ha renombrat amb un sufix aleatori (ex: admin7k2x/). Apunta-la: és la teva URL del back-office.

Amb això tens una botiga buida funcionant en local, llesta per trastejar-hi.