This is a tutorial about how to move a prestashop site 1.6 to a new server from localhost or an old server.
How to move a prestashop 1.6 site?
- Put your site to maintenance mode (optional).
- Change these settings “_DB_NAME_”, “_DB_USER_” and “_DB_PASSWD_” in the /config/settings.inc.php file. Generally not need to change the _DB_SERVER_, keep it as localhost or 127.0.0.1.
- Remove the these folders /cache/smarty/cache, /cache/smarty/cache if they exist.
- Zip all prestashop 1.6 files, and then upload the .zip file to your sever via a FTP client, and then unzip via cPanel.
- Export PrestaShop 1.6 database to a .sql file. If your site is on a test server, sometimes it’s difficult to expert database out via phpmyadmin. Alternative solutions are 1) Most hosting companies would provide a way to do backups, then just create a backup, you probably can find a .sql file of your database in the backup. 2) Ask your hosting company to export for you.
- Open the .sql file with a text edit(Like Editplus, Sublime), replace all old urls with the new ones. For example, the old url is http://192.168.1.10:8080, then you just need to replace all 192.168.1.10:8080 with yourdomain.com
- Create a database using phpmyadmin, and then import the edited .sql file.
- Login to your site back office to clear the Smarty cache.
- That’s all, wish you good luck.
You may find other tutorials on the internet having a step like this: Go to BO > SEO & URLs page to change shop domain to new one,that’s right, but that’s not the best, because you may have put your site url somewhere else, like a picture’s url may contains your site url, so replacing old urls in the .sql file is the best way.