Move prestashop to new domain looked difficult. That was only true until we discovered ourselves how to do it the proper way. There is only one or two tricks to learn. The basics are: backup the whole database and all files from existing store, upload all files and database to the new server or domain. Then we have to delete the .htaccess file from the root folder and locate the shop_url from the database on the new server. To simplify this, we will add the steps with screenshots below.
Complete tutorial
1Back-up existing store.
Open your FTP file manager, ex. Filezilla and copy all files from the root to a back-up folder named FTP.
Log-in to your PHPMYADMIN page and select the database which you want to back-up. If you have more then one database, don’t forget to first click on the database name on the left, to enter it. Then go to the upper tab: Export. Then select the following settings:
- Export Tab
- Custom mothod
- “Select all” tables button
- Click GO
2Change shop URL
Before we move prestashop to new domain, we have to edit something in the back-up of the sql database. The shop URL must match the new domain name IF it has a different domain name. So, if you move from www.demo.com to another server with same domain name it’s not necessary. When moving to any other domain name, you must change this table. See the pictures below, to read how to do this.
- Look for the following table in the dabase. Please use a decent file editor like notepad++
- Do a search function to find this table in the database: ps_shop_url.
- Edit this table and change the values like it should be.
- IF your root prestashop folder is not in a subdomain, but straight in the root. Edit the shop url like this:
domain: www.customit.be
domainssl : www.customit.be
physical_uri: / - IF you put your prestashop store in a subfolder, then please indicate the name of this folder like this:
domain: www.customit.be
domainssl : www.customit.be
physical_uri: /subfoldername/
3Delete .htaccess and transfer all to new server / domain
Final step is to delete the .htacces file from the FTP backup folder that you have made during the initial back-up. This file will be re-made by Prestashop once you enter the backoffice and click on the set domain URL again. In case of errors, you can also delete the cache files from the back-up. One tip, don’t delete the mentioned files from the back-up folder, but move them to a folder named: Files To Delete. If your website is online again, you can delete all these files.
Delete .htaccess file
Transfer all files and sql file to the new server.
- Use filezilla to copy and paste all the files to the same root folder on the new webserver. No special things here.
- Use PHPMYADMIN to select the database and then click import to import all the tables from the sql file. If the file size is too big? Then zip the sql file and try to see if its possible now. If its still not possible, just ask us on the comments below. We will explain how to change the max upload filesize from phpmyadmin.
RESET the shop URL’s in prestashop
Log into the admin link from your fresh prestashop, and find the following link: Preferences > SEO&URLS.
Verify the shops URL’s and then click SAVE. Now it is possible to visit the front office of your webshop without errors.
Martin
I moved my files to the new host and uploaded my database. For some reason im getting the error message no link can be established to database. Do you know what I did wrong? thanks for helping me!
Vanhims
Hello Martin, Please open the following file “/config/settings.inc” on the new host FTP account and edit these parameters:‘); ‘);‘);
define(‘_DB_SERVER_’, ‘localhost’);
define(‘_DB_NAME_’, ‘
define(‘_DB_USER_’, ‘
define(‘_DB_PASSWD_’, ‘
Vicky
Are you able to move Prestashop for me from 1and1 hosting to godaddy? Whats the charge?