babboon
babboon

Reputation: 793

prestashop move to new server drops back to localhost

When I try to move my site prestashop site to new server and when I trying to enter it, it drops me to localhost. What else needs to be done? I did these steps:

  1. Upload all files to new hosting via FTP
  2. Import the database using the phpMyAdmin utility
  3. On database we need to open ps_configuration table and edit the following lines: PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL and we replace the current domain www.olddomain.com, with the new one www.newdomain.com
  4. For last we have to edit the settings.inc.php file inside the config folder and change the values for database name _DB_NAME_, user _DB_USER_ and password: _DB_PASSWD_ That’s it, you only need to check .htaccess file permissions (777) and all should work correctly!

But it does not work correctly :|

Upvotes: 1

Views: 5371

Answers (3)

imo inyang
imo inyang

Reputation: 51

  1. Login to your PrestaShop admin panel on domain you are moving from (olddomain.com)

  2. Navigate to Preferences -> Maintenance and put your shop in maintenance mode to avoid loosing new customers or orders while moving the data.

  3. Navigate to Preferences -> SEO & URLs and scroll down to Set shop URL section. There please change Shop domain and SSL domain to your new domain (newdomain.com). Update Base URI if it is different on your new domain.

  4. Download all PrestaShop files and folders to your computer.

  5. Login to your phpMyAdmin and create a backup/dump of the database you are using for your PrestaShop.

  6. Create database on your new domain (newdomain.com) and import database backup/dump from your (olddomain.com)

  7. Edit /config/settings.inc.php file which you have downloaded to your computer. There you should update the settings for the new database server (with your own settings instead of the examples here):

    define('_DB_SERVER_', 'your.sqlhost.name.com'); define('_DB_NAME_', 'database_name'); define('_DB_USER_', 'database_user'); define('_DB_PASSWD_', 'database_pswd');

  8. Upload all the PrestaShop files and folders to your new domain (newdomain.com) via FTP.

  9. Remove all the files except index.php in /cache/smarty/compile and /cache/smarty/cache folders on your new domain (newdomain.com)

  10. Login to your PrestaShop admin panel on new domain (newdomain.com) and check if it is working properly.

  11. In your PrestaShop admin panel navigate to Preferences -> Maintenance and put your site online.

  12. Check that all the links are functioning, that all your products, images, modules and themes are still there, and try to create a new account and place an order to make sure your shop is working as expected.

Upvotes: 1

didier
didier

Reputation: 11

You also need to change the ps_shop url, the value of the domain by www.yournewdomain.com and change too the domain ssl by your new domaine www.yournewdomain.com. If you put your site in a subdomain then write the physical uri too www.yournewdomain.com/name-of-your-suddomain-prestashop.

It will work perfectly!

Upvotes: 1

romainberger
romainberger

Reputation: 4558

I had the same issue a few days ago and just spent 2 minutes trying to remember...

Anyway, if you're using 1.5, you also need to change the url in the shop_url table. Hope this helps!

Upvotes: 0

Related Questions