PrestaShop Backup and Migration: Complete Guide
PrestaShop Backup and Migration: Complete Guide
Regular backups protect your webshop against data loss. A good migration strategy ensures a smooth transition to new hosting. Learn how to create professional backups and safely migrate your PrestaShop shop.
Why Backups Are Essential
Backups protect against:
- Server failures or hardware issues
- Hacking attempts and malware
- Accidentally deleted files
- Failed updates
- Human errors
- Database corruption
Backup Strategy
What to Backup
A complete PrestaShop backup includes:
- Database: All products, customers, orders
- Files: Themes, modules, images
- Configuration: Settings and customizations
Backup Frequency
Recommended schedule:
- Daily: Database backup
- Weekly: Full backup (database and files)
- Before updates: Always create a backup
- After major changes: Create an extra backup
Retention Policy
Keep multiple backups:
- Last 7 daily backups
- Last 4 weekly backups
- Last 3 monthly backups
- Store in an external location
Creating a Database Backup
Via phpMyAdmin
- Log in to DirectAdmin
- Go to phpMyAdmin
- Select your PrestaShop database
- Click on Export
- Choose format SQL
- Select Quick or Custom
- Click on Start
- Download the SQL file
Via SSH
For large databases via command line:
- Connect via SSH
- Run the mysqldump command
- The file will be saved on the server
- Download via FTP or SCP
Via Installatron
- Go to Installatron in DirectAdmin
- Find your PrestaShop installation
- Click on Backup
- Select what you want to backup
- Click on Create Backup
- Download the backup file
Creating a File Backup
Important Folders
Make sure to backup these folders:
- /modules: All installed modules
- /themes: Themes including customizations
- /img: Product images and uploads
- /config: Configuration files
- /override: Custom code
- /translations: Translations
- /upload: Module uploads
Via FTP
- Connect with an FTP client like FileZilla
- Navigate to the PrestaShop root
- Select all folders and files
- Download to your local computer
- Compress into a ZIP file
Via File Manager
- Go to DirectAdmin
- Open File Manager
- Navigate to the PrestaShop folder
- Select everything
- Click on Compress
- Download the archive
Automatic Backups
Via Installatron
- Go to your PrestaShop in Installatron
- Click on Settings
- Find Automatic Backups
- Configure:
- Frequency (daily/weekly)
- How many backups to keep
- What to backup
- Save the settings
Via DirectAdmin
- Go to Backups in DirectAdmin
- Select your domain
- Configure automatic backups
- Choose backup location
Restoring a Backup
Restoring the Database
- Log in to phpMyAdmin
- Select the empty database
- Click on Import
- Select your SQL backup file
- Click on Start
- Wait for the import to complete
Restoring Files
- Delete or rename current files
- Upload your backup files via FTP
- Extract if necessary
- Check file permissions
Via Installatron
- Go to your installation
- Click on Restore
- Select a backup from the list
- Confirm the restore action
- Wait for the process to complete
Preparing for Migration
Pre-Migration Checklist
Before you start:
- Create a complete backup
- Note all settings
- Check PHP version on the new server
- Compare MySQL versions
- Plan the migration time
Activate Maintenance Mode
Prevent orders during migration:
- Go to PrestaShop back-office
- Enable maintenance mode
- Inform customers if necessary
Executing the Migration
Step 1: Create a Backup
- Create a complete database backup
- Download all files
- Check that everything is complete
Step 2: Upload Files
- Connect to the new server via FTP
- Upload all PrestaShop files
- This may take a long time for large shops
Step 3: Import Database
- Create a new database on the new server
- Create a database user with permissions
- Import the SQL backup via phpMyAdmin
- Note the new database details
Step 4: Adjust Configuration
Edit the settings.inc.php file:
- Open the file via FTP
- Update database details:
- Database name
- Database user
- Database password
- Database server
- Save and upload
Step 5: Clear Cache
- Remove contents of the cache folders
- Create a new class_index.php
- Clear Smarty cache
After the Migration
Testing
Thoroughly check:
- Homepage loads correctly
- Products are visible
- Images are displayed
- Checkout works
- Payments are processed
- Admin panel is accessible
Change DNS
- Update A-records to the new server
- Wait for DNS propagation
- Verify with whatsmyip tools
SSL Certificate
- Install SSL on the new server
- Force HTTPS in PrestaShop
- Test secure connection
Common Issues
White Page After Migration
- Check database settings
- Check file permissions
- View error logs
Images Not Visible
- Check paths in the database
- Regenerate images
- Check permissions on img folder
500 Error
- Check htaccess file
- Check PHP version compatibility
- View server error logs
Related Articles
- Setting Up PrestaShop Payments
- Optimizing PrestaShop Performance
- Installing PrestaShop via Installatron
- More Information on PrestaShop Hosting at Theory7
Need Help?
We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are happy to help.
0 van 0 vonden dit nuttig