Site icon PrestaShop | General Knowledge

How to Migrate a PrestaShop Store to New Hosting

How to Migrate a PrestaShop Store to New Hosting

Migrating a PrestaShop store to new hosting can improve website speed, security, reliability, and scalability. However, the migration process needs to be handled carefully to avoid data loss, broken links, database errors, or downtime.

In this guide, we’ll explain how to migrate a PrestaShop store to new hosting step by step, including backing up your files and database, transferring your store, updating configuration settings, testing the website, and switching your domain.

Why Migrate Your PrestaShop Store?

There are several reasons why a PrestaShop store owner may want to move to a new hosting provider:

Before starting the migration, make sure you have access to both your old hosting account and new hosting account.

Step 1: Take a Complete Backup

The first and most important step is creating a complete backup of your PrestaShop store.

You should back up:

  1. All PrestaShop files
  2. The PrestaShop database
  3. Images and uploaded files
  4. Custom themes
  5. Modules
  6. Configuration files
  7. Any custom code or modifications

Keep the backup safely stored on your computer or another secure location.

Back Up Your PrestaShop Files

Using your hosting control panel, FTP, or SSH, download the complete PrestaShop installation directory.

Make sure important folders such as these are included:

Do not assume that only the theme and product images need to be copied. A complete migration should include the entire store.

Step 2: Export the Database

PrestaShop stores important information in its database, including:

You can generally export the database using phpMyAdmin or your hosting provider’s database management tools.

Select the correct PrestaShop database and export it as an SQL file.

For a large store, make sure the export completes successfully before continuing.

Step 3: Create a Database on the New Hosting

Log in to your new hosting account and create a new MySQL or MariaDB database.

Record the following information:

You will need these details when configuring PrestaShop.

The database server is often localhost, but this depends on your hosting provider.

Step 4: Upload PrestaShop Files

Upload the complete PrestaShop backup to the new server.

You can use:

Make sure the files are placed in the correct document root for your domain.

For example:

public_html/

or the directory configured for your domain.

Avoid accidentally creating a structure such as:

public_html/prestashop/prestashop/

when your domain is supposed to load the store directly from public_html.

Step 5: Import the Database

Open phpMyAdmin or the database management tool on your new hosting account.

Select the newly created database and import the SQL backup from your old hosting account.

After the import, verify that the tables have been created successfully.

A normal PrestaShop database will contain many tables related to products, customers, orders, configuration, and other store data.

Step 6: Update PrestaShop Database Configuration

After moving the files and database, PrestaShop needs to know how to connect to the new database.

Depending on your PrestaShop version, the database configuration is commonly located in:

/app/config/parameters.php

For older PrestaShop versions, it may be located in:

/config/settings.inc.php

Update the database credentials if they have changed.

For example:

'database_host' => 'localhost',
'database_name' => 'new_database',
'database_user' => 'new_user',
'database_password' => 'your_password',

The exact configuration format depends on your PrestaShop version, so do not replace the entire file blindly.

Step 7: Update Your Domain Configuration

If you are keeping the same domain name, you will need to point the domain to the new hosting server.

This usually involves changing your DNS records.

For example, you may need to update:

DNS changes can take some time to propagate.

Important: Keep your old hosting active until the new website has been thoroughly tested.

Step 8: Check PrestaShop Shop URL Settings

PrestaShop stores the shop URL information in its database.

If you are moving to a different domain or changing the URL structure, update the appropriate shop URL settings.

If you are keeping the same domain, make sure the domain and SSL configuration are correct on the new server.

Also check whether your store uses:

Inconsistent URL settings can result in redirect loops or broken links.

Step 9: Configure SSL

Install an SSL certificate on the new hosting server.

Your store should normally be accessible through HTTPS:

https://www.example.com

After enabling SSL, check:

Also check for mixed-content warnings caused by HTTP resources.

Step 10: Clear the PrestaShop Cache

After migration, clear the PrestaShop cache.

Depending on your PrestaShop version, this can be done from the Back Office under the performance/cache settings.

You can also need to remove cached files manually in some situations.

Clearing the cache helps prevent old configuration or template files from interfering with the migrated store.

Step 11: Check File and Folder Permissions

Incorrect permissions can cause errors after migration.

Check that the web server has the required permissions to read and write files where PrestaShop requires them.

Avoid giving unnecessary 777 permissions to your entire website.

Use the permission settings recommended by your hosting provider and PrestaShop version.

Step 12: Test the Store Before Going Live

Before changing DNS, thoroughly test the new installation.

Check the following:

Front Office

Back Office

Place a test order if possible to verify the complete checkout process.

Step 13: Test Email Delivery

After migration, verify that your store can send emails correctly.

Test:

If emails do not arrive, check your SMTP configuration and the new server’s email restrictions.

Step 14: Check Your Modules and Theme

Custom modules and themes can sometimes cause problems after migration.

Check whether:

If your new server uses a different PHP version, compatibility problems are especially important to check.

Step 15: Check SEO and URLs

Migration should not accidentally change your SEO structure.

Check:

Use a crawler or manually inspect important pages for 404 errors.

If your URLs are unchanged, avoid making unnecessary URL changes during the migration.

Step 16: Update Your Sitemap

After confirming that the new store works correctly, generate or verify your XML sitemap.

Make sure it contains the correct HTTPS URLs.

If necessary, submit the sitemap again through Google Search Console.

This helps Google discover and crawl the migrated store correctly.

Step 17: Monitor the Website After Migration

Do not consider the migration finished immediately after DNS changes.

Monitor your store for several days.

Look for:

Review your server logs and PrestaShop error logs if you notice problems.

Common PrestaShop Migration Problems

1. Database Connection Error

This usually means the database name, username, password, or host is incorrect.

Check your database configuration carefully.

2. 500 Internal Server Error

Possible causes include:

Check the server and PrestaShop logs to identify the cause.

3. Images Are Missing

Make sure the complete /img directory was transferred.

Also check file permissions and image paths.

4. Website Redirect Loop

Check:

5. Admin Panel Does Not Work

Check the Back Office URL, cache, PHP compatibility, and database connection.

If necessary, enable appropriate debugging temporarily to identify the underlying error.

6. Checkout or Payment Does Not Work

Check the payment module configuration, SSL certificate, API credentials, webhook settings, and PHP compatibility.

Best Practices for a Safe PrestaShop Migration

Follow these recommendations to reduce the risk of downtime:

  1. Always create a complete backup before migration.
  2. Keep the old hosting account active until everything is verified.
  3. Test the new server before changing DNS.
  4. Use the same or compatible PHP version initially.
  5. Check database credentials carefully.
  6. Verify SSL before making the site live.
  7. Test checkout and payment processing.
  8. Check important SEO URLs and redirects.
  9. Monitor errors after DNS propagation.
  10. Keep a copy of the old website until the migration is confirmed successful.

Final Checklist

Before considering your PrestaShop migration complete, verify:

Conclusion

Migrating a PrestaShop store to new hosting requires more than simply copying website files. You need to move the PrestaShop files and database, configure the new server, update database credentials, configure DNS and SSL, and thoroughly test the store before and after going live.

A careful migration process can minimize downtime and help ensure that your products, customers, orders, SEO settings, and store functionality remain intact.

#PrestaShop #PrestaShopMigration #WebHosting #Ecommerce #PrestaShopTutorial #WebsiteMigration #OnlineStore #PrestaShopSEO #EcommerceWebsite #HostingMigration

Exit mobile version