Jump to content

Clone a prestashop site to another


Recommended Posts

1) Just copy all the files on your server into a new directory or server (if on the same server, then add the new domain as an add-on domain via CPanel)

2) Create a new DB (also via CPanel)

3) Edit the settings.inc.php file in the Config directory to point at the new DB

4) Regenerate the .htaccess file


I do it all the time when building my Test site.


Tip: Prestashop can generate a crap load of image files so you may need to go directly into CPanel* to transfer them all off, FTP sometimes doesn't work even though you think it has. I went insane trying to figure out why all my images weren't being downloaded even though it told me that they were.

*CPanel > Backups > Home Directory

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

HI V.I.P.,


Your explanation makes a lot of sense to me however:

I did the point 1, 2 and 3 with no problem. and the site runs locally on my apache server ...but not fully correctly. The links are indeed always pointing to the actual (in production) http://www.xx sites instead of localhost.

I guess it is due to the .htaccess which I cannot regenerate because when try to acess the Control panel ...the link is send me to the http://www.xxx real site..

Any help regarding this issue??
Thanks a lot!

Lionel

Link to comment
Share on other sites

I mean when I go to localhost/shop everything charges nearly correctly except that all images and link are pointing to the original website.
Also when I try to charge backoffice page by going to localhost/shop/Admin it opens the http://www.myshop.be/shop/Admin on the real website.

I though changed the variable PS_BASE_URI in the setting.inc.php of my local installation...but somehow it seems like it doesn't really take it into account.

Thanks a lot for your responsiveness.

I think it might interesting to make a small 5 steps procedures to explain how 1) create a test environment from production 2) to put test environment changes directly into the production environment. because I saw this question every now and then on the web with no clear answer.

Link to comment
Share on other sites

  • 5 years later...

@noesac: if you do that all the time, why don't you mention that also the database table ps_shop_url has to be changed?

 

If you move your prestashop to another directory, the value of physical_uri has to be changed accordingly!

Link to comment
Share on other sites

  • 8 months later...

1. Copy all files via FTP

2. Duplicate database to other hoster

3. check the php settings at your new hoster!! (PS <= 1.6.1.3 is not yet PHP7 ready! so you wont see anything in these cases)

3. open Database and edit "ps_shop_url". Set the new path and domain for your new shop

4. edit config/defines.inc.php and set the new database access

5. delete the .htaccess file in your shops root folder

6. login to the admin backend and go to settings > seo & urls and save the path and domain properties to create a new .htaccess file (after creating the new .htaccess file you will be able to view/use the frontend of the shop, not earlier as it contains all necessary info it needs to translate the friendly urls of the shop frontend)

Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...