Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

How to Reinstall PrestaShop on Your Server

3 min read
04.06.2025

Reinstalling PrestaShop is a process that involves removing the existing installation and setting it up again. This guide walks you through the steps to ensure a clean and successful reinstallation.

PrestaShop Reinstall Guide
PrestaShop reinstall — backup first; clean or preserve-data path.

For closely related PrestaShop topics, see How to Change the Email Sender in PrestaShop, PrestaShop IMAP Configuration Error, and PrestaShop VDS Installation Guide.

Backup Existing Data (Optional but Recommended)

Before reinstalling PrestaShop, it is a good idea to back up your current store, just in case you need the data later.

Backup the Files

  1. Log in to your server via SSH or FTP.
  2. Navigate to the directory where PrestaShop is installed (e.g., /var/www/html/prestashop).
  3. Download the directory to your local computer.

Backup the Database

  1. Log in to phpMyAdmin or connect via MySQL CLI:
  2. mysqldump -u root -p prestashop_db > prestashop_backup.sql
  3. Save the database backup to a secure location.

Remove the Existing Installation

Delete Files

  1. Navigate to the PrestaShop directory:
  2. cd /var/www/html/prestashop
  3. Delete the entire directory:
  4. sudo rm -rf /var/www/html/prestashop

Drop the Existing Database

  1. Log in to MySQL:
  2. sudo mysql -u root -p
  3. Drop the PrestaShop database:
  4. DROP DATABASE prestashop;
  5. (Optional) Recreate the database for a fresh install:
  6. CREATE DATABASE prestashop;
    
    CREATE USER 'prestashop_user'@'localhost' IDENTIFIED BY 'password';
    
    GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashop_user'@'localhost';
    
    FLUSH PRIVILEGES;
cPanel Hosting
Full control over your website
  • Convenient
  • Simple
  • Fast
  • Free 7-day trial
cPanel Hosting

Download and Reinstall PrestaShop

Download PrestaShop

  1. Navigate to your web server root directory:
    cd /var/www/html
  2. Download the latest version of PrestaShop:
    wget https://download.prestashop.com/releases/prestashop_1.7.8.8.zip

Extract Files

  1. Install unzip if not already installed:
    sudo apt install unzip -y
  2. Extract the archive:
    unzip prestashop_1.7.8.8.zip
    mv prestashop /var/www/html/prestashop

Set Permissions

  1. Set ownership:
    sudo chown -R www-data:www-data /var/www/html/prestashop
  2. Set proper permissions:
    sudo chmod -R 755 /var/www/html/prestashop

Create a New Configuration

  1. Open your browser and navigate to:
    http://yourdomain.com
  2. Follow the installation wizard:
    • Database Details: Enter the database name, username, and password you created earlier.
    • Admin Account: Set up a new administrator account.

Post-Installation Steps

Delete the Install Directory

After completing the installation, delete the install directory for security:

sudo rm -rf /var/www/html/prestashop/install

Secure Your Admin Directory

  1. Rename the admin directory:
  2. mv /var/www/html/prestashop/admin /var/www/html/prestashop/admin_secure
  3. Update the new directory name in your browser:
  4. http://yourdomain.com/admin_secure

Optional: Restore Data

If you need to restore data from your previous installation:

  1. Import the backed-up database:
    mysql -u root -p prestashop < prestashop_backup.sql
  2. Copy old images, themes, or other files back to /var/www/html/prestashop.

Troubleshooting

Issue Solution
Installation wizard not loading Check file permissions and web server configuration.
Database connection error Verify database credentials and user privileges.
Blank page after reinstallation Enable PHP error reporting and check logs.

Reinstalling PrestaShop ensures a clean setup, resolving any previous configuration issues.

Frequently asked questions
Clean: corrupted install, malware, fundamental wrong version installed. Preserve: just want PrestaShop core files fresh while keeping products/orders/customers. For preserve: backup DB, drop only PrestaShop files (not the database), reinstall files, restore DB. For clean: also drop and recreate DB. Most reinstalls are clean.
Database (mysqldump full DB), `images/` folder (all product images), `upload/` folder (file uploads), `themes//` (any customization), `modules//` (non-default modules). config/settings.inc.php for credentials reference. Skip standard PrestaShop core files — they come from the download.
Remove on production. Default PrestaShop install ships with demo products. Easy to forget to clear, then customers see weird demo categories. Install wizard has "Install demo data" checkbox — uncheck. If you missed, Back Office → Catalog → bulk delete demo products + categories.
Folders 755, files 644. Specific dirs writable by web user: `config/`, `img/`, `upload/`, `cache/`, `log/`, `download/`, `mails/`. cPanel users: set in File Manager → "Permissions". CLI: `find . -type d -exec chmod 755 {} \;` then `find . -type f -exec chmod 644 {} \;` then explicit chmod on the writable dirs.
Related articles
Setting Up PrestaShop on a VDS (Virtual Dedicated Server)
AddDefaultCharset UTF-8: How to Verify the Encoding of Files
"An installation already exists as per our records" — Softaculous Reinstall Fix