Jump to content

Recommended Posts



I would like to know if there is any official guide or guidelines to promote PrestaShop installations between environments.


In case there are 2 or more environments for a shop (test environment, production environment), which are the recommended steps to take to promote from one environment to another?


My concerns are:

- promote the shop main configuration options

- promote specific modules configuration options

- promoting the catalog

- promote changes in core or module files

- avoid long downtimes


To avoid some headaches, I'm thinking about this "simple solution":

There would be 2 environments: test (private) and production (public).


The test environment is where all the changes are made (with previous backups): core updates, module updates, shop configurations, catalog management, etc.


Once the test environment is "accepted", it gets cloned to the production environment (with previous backup). The cloning procedure would have this steps:

  1. Backup production files
  2. Remove all the old files from production
  3. Copy all the files from test to production
  4. Backup production database
  5. Remove production database*
  6. Copy the database from test to production
  7. Change the /config/settings.inc.php with the production database values

* I should save before the orders, the carts, the user information, etc before.


Am I missing something?


I just want to know if anyone has easier solutions, or solutions that minimize the downtime.


How are you making your environment promotions?

Edited by presty (see edit history)
Link to comment
Share on other sites

Hello Presty, thank you for the message. I think that the way you are doing it is the best way. Although it does involve taking the time and hassle of backing up and copying. The fact that you will have the backups ready and all pertinent information saved means that in the event something does go wrong. You will have your files and information backed up for an easier restoration. It is always better to be safe than sorry. I hope this helps, thank you for choosing PrestaShop!

Link to comment
Share on other sites

Thank you for your answer Benjamin.


I'm not sure it is the best way at all, it's just the "quick" way I have thought about.

In fact, the file uploads could be automatised using Git in the servers, and rolling back to previous versions in case something goes wrong.


My main concern is on steps 5 and 6:

The production database has all the customers, carts, and "live" data, which is not present in the test database. So I really don't know which tables must not be overriden during the promotion.


Any ideas about which tables should not be overriden? I can think of the obvious ones:

(ps_customer, ps_cart, ps_guest, ps_orders*), but I'm not sure how many more should be excluded.

Link to comment
Share on other sites

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...