Knowledgebase

How to move PrestaShop to a new host

In this article we'll provide you with a quick list of the things that you have to do to transfer your PrestaShop online store from one hosting provider to another. The steps are the same if you migrate the site from one account to another with the same hosting provider.


Free Website Transfer from HostKnox - get our PrestaShop hosting planand have our PrestaShop specialists take care of transferring your website for you at no additional cost.

To move your PrestaShop store you have to do the following:

  • Log into your store's admin panel on the old hosting account and put the site into maintenance mode. You can enable the new site once the transfer on the new hosting account is complete. Note that this is not essential for transferring your site.

  • Transfer the PrestaShop files and folders from the old hosting account to the new one. You can do this with an FTP client (e.g. FileZilla).

  • Transfer the database used by the application. To do this export the database from the old account. It will be exported in an SQL dump file. Then import that dump file in a database on the new account. You can do these things with phpMyAdmin. You can access phpMyAdmin from the control panel of the account(s).

  • You should update the database information in the PrestaShop file settings.inc.php so that a connection can be established between the files and the database on the new account. If you put PrestaShop directly in the public_html folder on the hosting account, the path to the file will be public_html/config/settings.inc.php. Inside the file look for the lines:
define('_DB_SERVER_', 'localhost');
define('_DB_NAME_', 'database_name');
define('_DB_USER_', 'username');
define('_DB_PASSWD_', 'password');

The database server should be localhost; replace database_name with the name of the database into which you imported the database dump file. The values username and password should be replaced with the username and password of the database user. You can add and manage databases and add users to them from the Databases section of the Pixie control panel.

  • If you transfer PrestaShop 1.4.x or an older version and the path to the application on the new account (in relation to the root web-accessible folder) is different than that on the old account, you should also edit the following line in settings.inc.php:

define('__PS_BASE_URI__', '/store/new/');

In the quotation marks put the correct path to the application on the new account. The path that you have to put is just the part that's added to the base URL. So in our example above, the path is /store/new/ which means that the application is installed in public_html/store/new on the account, and which in turn means that the frontend of the site is accessible at yourdomain.com/store/new. Put a forward slash at the beginning and also at the end. If the application is directly in the root public_html folder then the path should be only a forward slash.

  • If you transfer PrestaShop 1.5 or a newer version and the path to the application on the new account is different than that on the old account, you have to update it from the admin panel (there's no such setting in settings.inc.php). Log into the admin panel, go to Preferences menu>SEO & URLs sub-menu, on the page that opens find the section Set shop URL and edit the path in the field labeled Base URI. The path is in relation to the root web-accessible folder (public_html), so if the application is installed in public_html/store/new, you have to put /store/new/ in the Base URI field (note that there's a forward slash at the beginning and the end).

  • If you're going to change the domain name of the transferred site as well, you have to update the domain name options in the admin panel (no matter what PrestaShop version you use). Go to Preferences menu>SEO & URLs sub-menu and put the correct URL (e.g. yourdomain.com) in the fields for shop domain and for domain with SSL.

For some more details you can also check out the tutorial on how to transfer your PrestaShop site.

Was this answer helpful?

 Print this Article

Also Read