Prestashop Migration – Local to Live

In today’s video we will have a look at the Prestashop migration procedure, from a local environment to a live website.

Steps Breakdown

Transferring files

Whether you have your files locally stored, or on another webhosting, you need to upload all of them to the new space.
As I am developing using WAMP (you can use MAMP on mac, or XAMPP), I can simply access my site using and FTP Client, such the free FileZilla, and upload my site to a folder I choose. In my example, I want the site to be reachable at, so all the files will go inside public_html/testpresta.
Of course, if you are moving to the root of the domain, you can simply place all of them inside the public_html (sometimes names httpdocs) folder.
As a side note, if you move from a previous hosting space, you can use a free service like, instead of downloading and uploading all files again (a great time saver!).

Database Export/Import Operations

First off, we need to export the previous database. Reach your local phpMyadmin and export your database (all tables). Depending on the size, you might want to use a custom export method and compress it (say, with gzip). You might run into timeout errors if it’s too big, at the time you import it!
As soon as it’s done, login to the new hosting control panel, scroll to “Database Wizard”, and create a new database. Then create the user, remembering to store its credentials somewhere safe, and give it all privileges.
Back to the cPanel home, scroll down and click on PhpMyadmin, open the new database, and then import the one we exported a while ago!

Linking to the database

If you try to access your site now, you’ll probably get a ‘Link cannot be established error’. We need to add the new credentials to the Prestashop settings file.
Therefore, access the site via ftp again, then config/

You can use any text editor to open it. Find these lines:

define(‘_DB_NAME_’, ‘presta156’);
define(‘_DB_USER_’, ‘root’);
define(‘_DB_PASSWD_’, ”);

And change the database name, user and password according to the new ones!
Re-upload the file.

Final configuration touches

It might look like the site works now, but it’s still redirecting to the old site (the local one, or old domain if you changed it). Using ftp again, delete the .htaccess stored in the root of your Prestashop Installation.
Then, in the database, look for ps_configuration, and search for an entry named ‘PS_SHOP_DOMAIN’. You must change this to the base url of the website. In my case, instead of localhost, I must write Do the same for PS_SHOP_DOMAIN_SSL.

Lastly, access the ps_shop_url table, and change the domain, domain_ssl of the shop(s) according to the new one as we did a while ago. As for the physical_url column, it represents the physical directory where the site is now stored. In my case, I was on localhost/presta156, and now am on nemops-themes/testpresta. So this must be changed to testpresta.


You can now access your website. Just to be sure everything works, navigate to the SEO and URLs tab in the back office, scroll down and save the section with the site urls. This will eventually regenerate your .htaccess file. Please not that you might run into front-end issues if you have Friendly urls enabled, but the new server doesn’t support them!

Looking for quality PrestaShop Hosting? Look no further than Arvixe Web Hosting!

Tags: , , | Posted under PrestaShop, Video | RSS 2.0

Author Spotlight

Fabio Porta

Fabio has been involved in web development and design since 2005, when launched his first website at the age of 16. He’s now highly skilled in both client and server side development, along with design, and since August 2012 runs a successful website about PrestaShop tutorials and Prestashop Modules called Nemo’s Post Scriptum, at

10 Comments on Prestashop Migration – Local to Live

  1. Zeeshan says:

    Hello, i’m setting up my prestashop shop from online server to locacl mechine & i followed all your given steps but still it didn’t work for me somehow. When i access the local url i shows the white blank page. i would appreciate if you can help me in figure out the solution

  2. peestiga says:

    it’s works.. but, i can’t access my admin page, there is no error or warning message.. how to fix it ?

  3. kishore says:

    i have done all ur steps but still there is error.
    Can’t access my admin page and front end page. iam using openshift and filezilla.
    the error is as follows when i click on back office.


    Unknown column ‘last_connection_date’ in ‘where clause’

    UPDATE `ps_employee`
    SET `last_connection_date` = CURRENT_DATE()
    WHERE `id_employee` = 1 AND `last_connection_date`setError(500, ‘[SQL Error] ‘.$this->getMsgError().’. From ‘.(isset($dbg[3][‘class’]) ? $dbg[3][‘class’] : ”).’->’.$dbg[3][‘function’].'() Query was : ‘.$sql, 97);
    642. }
    643. elseif (_PS_DEBUG_SQL_ && $errno && !defined(‘PS_INSTALLATION_IN_PROGRESS’))
    644. {
    645. if ($sql)
    646. throw new PrestaShopDatabaseException($this->getMsgError().”.$sql.”);
    647. throw new PrestaShopDatabaseException($this->getMsgError());
    648. }
    649. }
    651. /**
    DbCore->displayError – [line 340 – classes/db/Db.php] – [1 Arguments]
    DbCore->query – [line 480 – classes/db/Db.php] – [1 Arguments]
    DbCore->execute – [line 460 – classes/Employee.php] – [1 Arguments]
    EmployeeCore::setLastConnectionDate – [line 2458 – classes/controller/AdminController.php] – [1 Arguments]
    AdminControllerCore->init – [line 163 – classes/controller/Controller.php]
    ControllerCore->run – [line 373 – classes/Dispatcher.php]
    DispatcherCore->dispatch – [line 54 – admin/index.php]

  4. yusuf says:

    I have two domains on a hosting account. I followed all your steps and it was ok till i changed the settings file. Thereafter i couldn’t find the .htacess file in my main folder, and changed my database settings. Now the website redirects to the other domain. 🙁

  5. Lyall says:

    I just wanted to say thank you! I saved this video in my favourites a little while ago as I knew I’d need it. Today I nervously did my migration from local development to GoDaddy hosting and it went almost without a hitch completely down to this video! I was very worried even though I usually know what I’m doing, as I’m completely new to Prestashop and MySQL (I’m more familiar with .NET and nopCommerce with SQL via SSMS).

    This video was EXACTLY what I needed, thank you again!

Leave a Reply

Your email address will not be published. Required fields are marked *