How to Reinstall PrestaShop on Your Server
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.
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
- Log in to your server via SSH or FTP.
- Navigate to the directory where PrestaShop is installed (e.g.,
/var/www/html/prestashop). - Download the directory to your local computer.
Backup the Database
- Log in to phpMyAdmin or connect via MySQL CLI:
- Save the database backup to a secure location.
mysqldump -u root -p prestashop_db > prestashop_backup.sql
Remove the Existing Installation
Delete Files
- Navigate to the PrestaShop directory:
- Delete the entire directory:
cd /var/www/html/prestashop
sudo rm -rf /var/www/html/prestashop
Drop the Existing Database
- Log in to MySQL:
- Drop the PrestaShop database:
- (Optional) Recreate the database for a fresh install:
sudo mysql -u root -p
DROP DATABASE prestashop;
CREATE DATABASE prestashop;
CREATE USER 'prestashop_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashop_user'@'localhost';
FLUSH PRIVILEGES;
Download and Reinstall PrestaShop
Download PrestaShop
- Navigate to your web server root directory:
cd /var/www/html - Download the latest version of PrestaShop:
wget https://download.prestashop.com/releases/prestashop_1.7.8.8.zip
Extract Files
- Install unzip if not already installed:
sudo apt install unzip -y - Extract the archive:
unzip prestashop_1.7.8.8.zip mv prestashop /var/www/html/prestashop
Set Permissions
- Set ownership:
sudo chown -R www-data:www-data /var/www/html/prestashop - Set proper permissions:
sudo chmod -R 755 /var/www/html/prestashop
Create a New Configuration
- Open your browser and navigate to:
http://yourdomain.com - 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
- Rename the admin directory:
- Update the new directory name in your browser:
mv /var/www/html/prestashop/admin /var/www/html/prestashop/admin_secure
http://yourdomain.com/admin_secure
Optional: Restore Data
If you need to restore data from your previous installation:
- Import the backed-up database:
mysql -u root -p prestashop < prestashop_backup.sql - 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.
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.
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


