Jump to content

TUTORIAL - How to clone your shop for upgrades


Recommended Posts

PLEASE NEVER MAKE UPGRADES ON LIVE SYSTEMS FOR non-oficial releases !! Clone your project before and test only on this clone. If roll-back for instance do not work you will have a broken live shop.

 

How to clone:

1 - Enable maintenance mode and disable smarty cache and cache system. (Restore as before when backup is done)

2 - Backup database before you can clear this tables to make backup much faster ps_connections, ps_connections_page, ps_connections_source, ps_pagenotfound, ps_page_viewed, ps_search_index, ps_search_word, ps_statssearch

3 - Backup FTP : clear all cache before to reduce weight of download.

For 1.4 to 1.6, delete all files and folders in /cache/smarty/cache/ and /cache/smarty/compile/

For 1.7, delete all files and folders in /var/cache/

4 - Create new database and load your back-up to this new database

5 - Upload the back-up to your FTP in a sub-folder or other host if you have

6 - PS 1.3 to PS 1.6 - change in your /config/settings.inc.php the database name (and login data if other). Change there also the base_uri if your clone is in a sub-folder. Save the file to your clone !!

6 - PS 1.7. - change in your /app/config/parameters.php the database name (and login data if other). Change there also the base_uri if your clone is in a sub-folder. Save the file to your clone !!

7 - login to your back-office of the clone and change there the URL under "preferences - SEO & URL's" for to your clone. Save new settings.

8 - before you use the 1-click-module please counter-check if the new settings applied, to avoid errors. Go to your Database and check there the ps_configuration. If clone is in a subfolder, so there must be the setting /your subfolder added there. If your clone is in a new host(domain), so the new domain must be there added. Check each line of the ps_configuration to avoid any possible error.

example:

your clone is in a new subfolder, PS_SHOP_DOMAIN, value=yourdomain/subfolder, PS_SHOP_DOMAIN_SSL value=yourdomain/subfolder

your clone is in a new host/domain, PS_SHOP_DOMAIN, value=newdomain, PS_SHOP_DOMAIN_SSL value=newdomain

9 - If your clone is in a new host/domain, please also check your .htaccess and change in each line the old domain to the new one, if it wasn't changed form back-office new settings.

10 - now you can use the 1-click-module for to upgrade your shop. If you are upgrading major releases I suggest you choose: " Disable non-native modules = YES" and also Upgrade the "default" theme = YES. You can disable option to make backup of database and files to speed up upgrade because you have this already.

11 - if you encounter some errors on upgraded shop, please activate debug mode and report your errors in bug-tracker

 

Activate debug mode.

 

rework your file /config/defines.inc.php and change the false to true.

/* Debug only */
define('_PS_MODE_DEV_', true);
if (_PS_MODE_DEV_)

Official tutorial from Prestashop developers you will find here (incl. video). http://www.prestasho...r-online-store/

 

  • Like 4

Share this post


Link to post
Share on other sites

Rename the .htaccess on root of your shop to .htaccess-bak for ex.

Add a new empty file at same place (root of your shop on FTP) called .htaccess.

Regenerate the .htaccess from your back-office on tab: Preferences -> SEO & URL's. Take any of the settings there and save without changes. This will create new .htaccess.

base_URI you will find on same tab named one line before.

Share this post


Link to post
Share on other sites

  • 7 months later...

Hi,

I try this several days. The copy is always linkin back to the live shop. Changed all old domains in the database and it´s still linkin to it. Has anything changed with 1.7.2.4? Any hint for me?

I´ve tried to install a clean shop of the same version and just integrated the database. Directly linkin to the liveshop again. Copied the database file to my pc and opened it in notpad++. There is no liveshop domain existing anymore. Still linking to it.

 

Edit: I have access to the backend now. Frontend is still linking to the liveshop.

Edited by Shad86 (see edit history)

Share this post


Link to post
Share on other sites

  • 3 months later...

For this point: 5 - login to your back-office of the clone and change there the URL under "preferences - SEO & URL's" for to your clone. Save new settings.

 

I think it would be necessary a sql code to automate the update of the server's test like this:

 

UPDATE ps_configuration SET value="test.domain.com" WHERE name="PS_SHOP_DOMAIN";
UPDATE ps_configuration SET value="test.domain.com" WHERE name="PS_SHOP_DOMAIN_SSL";

Edited by Carlos (see edit history)

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More