Fast & reliable UK hosting + UK technical support = Squirrel Hosting
Hosting Control Panel
Webmail Login
  • Dont forget if you find any of our blog posts useful, why not say thanks by clicking our social icons and help spread the word?

Prestashop Guide : How to transfer/move Prestashop to a new server : 13-12-2012

Transfer / Move Prestashop to a new server

Transferring your prestashop site over to a new server is actually quite simple assuming you have the right guide to follow! The below guide will show you every step involved in great detail.

Please note this guide assumes you have purchased Prestashop hosting either from Squirrel Hosting or another company.

Move servers

Step 1 : Check your Prestashop Version and update!

It's always best to make sure your Prestashop site is running the latest version before starting a transfer. You can do the below guide without updating but if any errors occur it may be harder to get the help needed.

Step 2a : Backup your old Prestashop site automatically

Some hosting companies (ourselves included) have a 1 click backup facility on the server. This backs up all the necessary files and databases needed to run your website. If you have this feature on your old host, I recommend using it as it's quicker and easier! Also if you do have this feature you can skip to step 3!

Step 2b : Backup your site manually : Prestashop FTP Backup

OK so you need to backup your files but you're not sure how? Well the first thing to understand is prestashop is split into two sections;

Without both of these your site wont function. Therefore we need to back both of them up. Backing up the files can be done via FTP. Don't worry this is actually quite easy to do and is described below.

First contact your current hosting company and ask them for the FTP connection details. These will include

and can often be found in your old hosting control panel.

The next thing we need to do is get a program which is capable of accessing your hosting via FTP. We use the Filezilla Client (avaliable free here http://filezilla-project.org/) and instructions below are based on this program.

Open up FileZilla (on windows PC, click the windows icon in bottom left, click all programs, click FileZilla FTP Client, click FileZilla) and enter your host, user name, password and port number at the top of the page. Then click connect.

ftp into Prestashop

You should now be connected to your hosting and should see a series of folders in the right pane. We need to navigate to your public directory. This is usually called Public_html or htdocs. Double click it to open it. If you have installed Prestashop into a sub folder e.g. www.yoursite.com/shop then you will need to navigate to that folder.

Prestashop public html

Once you are in your Prestashop directory you should see a list of prestashop files. These include but are not limited to products-comparison.php, order.php and index.php. If you can see these files you are in the right directory. The next thing we need to do is download all these to a folder on our computer. In this case we will download them to a folder on our desktop called old site. To download all the files at once windows users can click on any file once then press and hold the CTRL keyboard key and press the letter A. This will highlight all the files. Then you left click on any highlighted file and whilst holding down the mouse button move the mouse over the old site folder, then release the mouse button.

Copy Drupal Files FTP

If you did this correctly you should see a lot of green and black writing appear at the top and files should start appearing in the 'old site' folder on your desktop.

PRestashop FTp Transfer

Once FileZilla has finished downloading, the text will stop scrolling and display something along the lines of 'File transfer successful, Status: Disconnected from server'. Check the files are in your old site folder and if so you can now close FileZilla.

Step 2c : Backup your site manually : Prestashop MySQL Database Backup

The next thing we need to do is backup your Prestashop Database. To do this we will use phpMyAdmin. Contact your current hosting company and ask them for information on how to access phpMyAdmin. You can usually access it via your hosting control panel, it usually has an icon like the one below.

Drupal Database Mysql

Once you've found it, open it up and look for your Prestashop Database on the left. The database usually has the term Presta or shop in it.

TIP: If you have more than one database and don't know which one is your Prestashop shop, look in the folder you downloaded your site files to (old site) and open the folder 'config'. In here you should see a file called settings.inc. Open this up with a text editor such as notepad and you will see the following;


define('_DB_SERVER_', 'localhost');
define('_DB_TYPE_', 'MySQL');
define('_DB_NAME_', 'DATABASE NAME');
define('_DB_USER_', 'USERNAME');
define('_DB_PASSWD_', 'PASSWORD');
define('_DB_PREFIX_', 'ps_');

Whatever is written in DATABASE MAME is the name of your database.

Click your Prestashop database to load it up.

Prestashop Database

Next, click the export tab at the top.

Click Export Prestashop Database

Click on the custom radio button to load up more options.

Custom export

Make sure to choose Zipped from the export database compression dropdown

Zipped

Leave all the other options as they are and click the go button.

Go

It should ask you to download a file to your computer. Save this next with your 'old site' folder.

You now have a full backup of your Prestashop site

Step 3 : Set up a new database on your new hosting.

The next step to getting your Prestashop transfered over to your new hosting is to set up a new database on your new hosting. Most hosting companies have a feature in the control panel which will allow you to do this. The instructions below are for Squirrel Hosting customers. Non Squirrel customers, ask your Hosting company how to set up a new database and access it via phpMyAdmin

Squirrel Hosting customers, click the control panel in the top right at www.squirrelhosting.co.uk.

Load Control Panel

Enter your user name and password then click 'login'.

Login

Scroll down and Click 'Manage your hosting'.

Manage your hosting

Click 'Load eXtend Control panel' next to the domain name you want to install prestashop on to.

Load eXtend control panel

In the pop up window, click the MySQL icon

Mysql Icon

Under the 'Create a MySQL Database' section enter a user name and password, try and include a number and one capital character to make it more secure. Then click the 'create' button.

Create Prestashop Database

You have now made a blank database for your Prestashop site.

Prestashop databse Username password

Note down the Username / Password as you will require these later. Click the 'now' button next to your database to load up phpMyAdmin.

Step 4 : Insert your Prestashop Database.

Next we need to insert our old Prestashop database into our new one. To do this, click your new prestashop database on the left hand side.

new Prestashop Mysql database

Click on the import tab.

Import Prestashop Database

Click the 'Choose File' button and select your old mysql database file (the zip file we downloaded in step2c)

Choose Prestashop Database

Once complete, you should get an 'import has been sucessfully finished' message.

Import Sucsessfully finsihed queries executed

You can now close any phpMyAdmin windows you have opened as the database bit is finished.

Step 5 : Edit your Prestashop's config/settings.inc File

Your settings.inc file will have your old Prestashop database user name and password. For the new site to work you will need to update these to the new user name and password you made earlier on in step 3.

Open up your old site folder (where you downloaded Prestashop to on your computer) and double click the config folder to open it up. You should see a file called settings.inc. You will need to open this in notepad or a similar program to edit it.

TIP: Never open this with Microsoft word or another rich text program, it will corrupt the file! Use a plain text editor such as notepad.

Once you've opened the file, you should see something like;

     <?php
define('_DB_SERVER_', 'localhost');
define('_DB_TYPE_', 'MySQL');
define('_DB_NAME_', 'OLD database name');
define('_DB_USER_', 'OLD database username');
define('_DB_PASSWD_', 'OLD database password');
define('_DB_PREFIX_', 'ps_');
define('_MYSQL_ENGINE_', 'InnoDB');
define('__PS_BASE_URI__', '/');
define('_PS_CACHING_SYSTEM_', 'MCached');
define('_PS_CACHE_ENABLED_', '0');
define('_MEDIA_SERVER_1_', '');
define('_MEDIA_SERVER_2_', '');
define('_MEDIA_SERVER_3_', '');
define('_THEME_NAME_', 'prestashop');
define('_COOKIE_KEY_', 'randome key');
define('_RIJNDAEL_KEY_', 'random key');
define('_COOKIE_IV_', 'sLSoQzWS');
define('_RIJNDAEL_IV_', 'b2AQ12ExO/mbF2CHgVHBcA==');
define('_PS_CREATION_DATE_', '2012-12-12');
define('_PS_VERSION_', '1.4.7.0');
?>

We will need to change the _DB_NAME_ (database name), _DB_USER_ (database username) and _DB_PASSWD_ (database password) to match your new database.

     <?php
define('_DB_SERVER_', 'localhost');
define('_DB_TYPE_', 'MySQL');
define('_DB_NAME_', 'NEW database name');
define('_DB_USER_', 'NEW database username');
define('_DB_PASSWD_', 'NEW database password');
define('_DB_PREFIX_', 'ps_');
define('_MYSQL_ENGINE_', 'InnoDB');
define('__PS_BASE_URI__', '/');
define('_PS_CACHING_SYSTEM_', 'MCached');
define('_PS_CACHE_ENABLED_', '0');
define('_MEDIA_SERVER_1_', '');
define('_MEDIA_SERVER_2_', '');
define('_MEDIA_SERVER_3_', '');
define('_THEME_NAME_', 'prestashop');
define('_COOKIE_KEY_', 'randome key');
define('_RIJNDAEL_KEY_', 'random key');
define('_COOKIE_IV_', 'sLSoQzWS');
define('_RIJNDAEL_IV_', 'b2AQ12ExO/mbF2CHgVHBcA==');
define('_PS_CREATION_DATE_', '2012-12-12');
define('_PS_VERSION_', '1.4.7.0');
?>

These are the details you wrote down at the end of step 3. On Squirrel Hosting your _DB_NAME_ will be the same as your _DB_USER_. Once you have made the changes, click save.

Step 5 : Upload your files to the new server.

The final step is to upload all your old Prestashop files to the new server. To do this you need to connect via FTP and drag the files from the 'old site' folder onto the new hosting public_html (or htdocs) folder.

Squirrel Hosting users can find their FTP details (and unlock the FTP) using the below guide. If you're using another company, you will need to ask them for your new FTP details.

Log into your squirrel hosting account at www.squirrelhosting.co.uk and click 'manage web hosting'. Then click, 'Load eXtend Control panel'. Once loaded, scroll down and on the right hand side you should see a box labelled 'unlock FTP'. Choose 1 Hour from the options and click the unlock button.

Unlock FTP

Next scroll down a bit further and you will see your FTP Host/server user name and password. Write these down.

FTp Details

Next, open up FileZilla and enter your new host's connection details (the ones from above) in the boxes at the top. For Squirrel Hosting you may leave the port blank.

ftp into PRestashop

Next, double click on public_html or the equivalent folder if using another hosting company.

Prestashop public html

Next we need to upload all the files we downloaded from your old host. Locate the folder where these files are stored (old host) and highlight all the files in the folder (CTRL+A). Finally left click on the files and drag them over onto the empty public_html folder window.

Transfer prestashop Files

That's it! Once the files are transfered you should be able to view your new site.

If you have any issues or would like further help with a transfer please open a support ticket where one of our staff will be happy to help.

Spotted anything you think is wrong or could be done better, not a Squirrel Hosting customer but stuck using this guide? Drop a comment below and we'll see if we can help.

Share this post on Reddit

Your Comments on Prestashop Guide : How to transfer/move Prestashop to a new server

Gravatar
Aloys: This guide really helped alot! I got one issue and that is that the frontoffice have links to the old url, can this be included in the guide also to have a solution to this also?
Tue Jan 15 09:46:08 2013
I like this comment — 2 people like this
Gravatar
Christina @ Squirrel Hosting: Hello Aloys, If you are switching to a new domain name you will need to edit PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL options in your Prestashop’s database. Log into your phpMyAdmin and browse the table ps_configuration. You will see the above records. Change these to your new domain name.
If you are having trouble doing this and are a Squirrel Hosting customer please submit a support ticket and we will be happy to make the changes for you.
Hope this helps.
Tue Jan 15 10:18:59 2013
I like this comment — 3 people like this
Gravatar
Vlad Anghene: hello,
I'm trying to move ps to localhost, did all the above and still, having problems with css on page.
links work, products show up, but nothing.
i replaced the formerdomain.com with localhost, and this is reflected in the database where @Christina mentioned.
Help ?!
Mon Apr 8 14:02:12 2013
I like this comment — 2 people like this
Gravatar
Jonathan @ squirrelhosting: If the products are loading I would suggest looking either in your template files or view the source on your local host and check the path of the style sheet. Also check the paths in your CSS. You may also want to search the database for your domain.
Mon Apr 8 14:22:03 2013
I like this comment — 1 person likes this
Gravatar
simon: i have a problem wile moving prestashop on a new server, i have a big sql database, when i upload file.sql.zip i have to resume it because i get timeout but it resume.
but i get an error that say character_set_name cannot be setted to null
Thu Apr 25 11:37:35 2013
I like this comment — 3 people like this
Gravatar
Jonathan @ squirrelhosting: Hello Simon
Is this on our servers? You could try using http://www.sqldumpsplitter.com or http://www.ozerov.de/bigdump if your SQL file is to large to import in one go. Or you could also look at Partial Import featur in PHPMyAdmin
Thu Apr 25 14:00:24 2013
I like this comment — 1 person likes this
Gravatar
simon: tks for a so quick answer but i think u don't understand, the problem is not on the partial import but is on the character_set_name table, phpmyadmin try to set it to null but it can't be, servers the same operating sistem and same setting overall
Thu Apr 25 14:44:43 2013
I like this comment — 1 person likes this
Gravatar
Jonathan @ squirrelhosting: Hello Simon, Sorry just to confirm this isn't on our servers but your own system? Without looking at the SQL or the server setup its a bit hard to help but just to confirm you have tried removing the character_set_name and re-importing it in (on it's own without the rest of the database)? I would suggest posting your issue on http://www.prestashop.com/forums/ or if you are on our servers please open a support ticket where one of our team can look into your Prestashop install/MySQL dump for you.
Thu Apr 25 15:03:03 2013
I like this comment — 6 people like this
Gravatar
Alan: Hello,
I am pleased you provide such an easy to follow instruction to migrate prestashop website. I did exactly what is written in the tutorial and attempted to migrate my prestashop from old websit http://lmfoong.com/prestashop to NEW website http://wampserverhost.com/prestashopback But when I try to load the new website url, when the webpage open, it quickly switch to the old url http://lmfoong.com/prestashop. Is there other place I need to set or change ? Appreciate your help.
My email is lmfoong@kisconsulting.org
Thanks
Thu Apr 25 16:23:16 2013
I like this comment — 4 people like this
Gravatar
Jonathan @ Squirrel Hosting: Hello Alan : You will need to edit PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL options in your Prestashop’s database under the table ps_configuration to use your new URL
Thu Apr 25 16:27:09 2013
I like this comment — 1 person likes this
Gravatar
Alan: Dear Jonathan,
Thanks for the fast response. I followed your instruction to edit the table ps_configuration to my new domain http://wampserverhost.com I also tried to use the new full url http://wampserverhost.com/prestashopback BUT both ways still do not work. What else I need to do ?
Fri Apr 26 02:16:07 2013
I like this comment — 1 person likes this
Gravatar
Jonathan @ Squirrel: It's loading fine at our end. Try clearing your browser's cache.
Fri Apr 26 08:22:48 2013
I like this comment — 1 person likes this
Gravatar
Alan: Dear Jonathan,
the trick was with the ps_shop_url table. I need to update the new domain information here as well. It is resolved now.
Sun Apr 28 07:44:39 2013
I like this comment — 2 people like this
Gravatar
karthik: Hi,
i have been moved my prestashop from server to localhost.But still that url going to server(like this http://www.xxx.de/newprestashop) :(

my localhost shop name :newprestashop
And i have configured the tables ps_shop_url,ps_configuration server to localhost..
Fri Jul 5 05:47:56 2013
I like this comment — 3 people like this
Gravatar
Jonathan: I'd suggest doing a search on your database for any reference to your domain. Check the url in PS_SHOP_DOMAIN. Also you could update your hosts file to force it to load your localhost ip for your domain.
Fri Jul 5 09:13:11 2013
I like this comment — 1 person likes this
Gravatar
Johnson: Hello .I am really happy for have found this forum even as is already late but i wish some one can be of help to me .I was trying to transfer my prestashop to new hosting because the old one is not uptime after reading this post i notice i did not follow the steps .i did not backup the database but downloaded all the files via FTP and has uploaded to the new server via FTP as well ,no configuration on the new server has been made and when i try to open the site i get this error message : Link to database cannot be established: SQLSTATE[28000] [1045] Access denied for user 'hawansto_pres147'@'localhost' (using password: YES) i am just confuse on where to start .an advise or help will really be appreciated .Thanks very much
Thu Jul 18 06:26:27 2013
I like this comment — 1 person likes this
Gravatar
Jonathan @squirrelhosting: Hello Johnson, simply start the guide from the beginning but when you upload your files on the new server, let it overwrite what's on their already. Your error message is due to no database and incorrect connection details.
Thu Jul 18 08:39:17 2013
I like this comment — 1 person likes this
Gravatar
kiavash2k: Another NOTE: when you do migrate everything is ok but some features doesn't works because of folder permissions. you need to check the folder permissions too.
Sat Oct 5 09:57:26 2013
I like this comment — 1 person likes this
Gravatar
sweehin: After i have migrate everything to new host and new domain, i cannot log in to my prestashop backoffice using the same password and email id i used to login to my old host and old domain. What do i need to change in order that i can log in?
Fri Nov 8 11:04:59 2013
I like this comment — 1 person likes this
Gravatar
Jonathan @ Squirrel Hosting: @sweehin : Are you on our servers? If so open a support ticket and one of our team will look into this for you. If not double check your admin config file has the correct details in it. Also check_COOKIE_KEY_ , _COOKIE_IV_ , _RIJNDAEL_KEY_ , _RIJNDAEL_IV_ match in both files.
Fri Nov 8 11:14:29 2013
I like this comment — 2 people like this
Gravatar
arya: We want to move from old server to newserver uploaded files n database is also done..even changed under config/setting.inc also but when we click on new server url its taking xamp/splash.php
not understanding why its happening
Thu Jan 9 10:22:25 2014
Gravatar
arya: s we checked with the config everything is fine..even i arised the ticket also but unfortunately they unable to access the url's of cpanel
..
Thu Jan 9 10:27:21 2014
Gravatar
Jonathan @ squirrelhosting.co.uk: Hello Arya, are you on our servers? What version of Preston are you using? Have you checked the PS_SHOP_DOMAIN in the database. Can you access the admin?
Thu Jan 9 10:32:24 2014
Gravatar
Marcelo: Hello I moved my ps installation from a sever to another, but in the newone I get errors related with my old server address, I mean, for example: Warning: file_put_contents() [function.file-put-contents]: Only 0 of 43636 bytes written, possibly out of free disk space in /home/marcelo/public_html/classes/Autoload.php on line 142" BUT, home/marcelo/.... it's my old address, and I check my database, the tables ps_shop_url and ps_configuration, has a right values, I change my settings.inc.php too, of course. Have you any idea?
Tue Mar 11 12:04:36 2014
Gravatar
didier: i followed all the process but still have the same problem,i have message error!,why?
thanks
Tue Apr 29 13:47:53 2014
Gravatar
Jonathan @ Squirrel Hosting: @ Marcelo : What PrestaShop version are you running?
@ Diddier : What is the error message you are getting. What PrestaShop version are you running?
Tue Apr 29 14:39:28 2014
Gravatar
Chand: Thanks very much for the guide!
Just wondering, what should the folder's permisson be... and which folder are we talking about here? The public_html/ folder?
Tue May 27 04:51:16 2014
Gravatar
Jonathan @ Squirrel Hosting Ltd: Permissions of folders on our servers are 755 but this can vary depending on your host. Do not set to 777 as this may leave your site vulnerable to hacking. If you are on our servers, you do not need to alter/edit any permissions after a FTP upload.
Tue May 27 08:31:42 2014
Quintessential
Via twitter @TheQWeddingCo on the 09-02-2014
Loving the quick response to queries!! Highly recommend #SquirrelHosting
What other customers have recently purchased :
Secure Credit Card Processing