4

I have an e-commerce website (Magento) I will be publishing soon. My current setup consists of a development, staging, and production site each with their own database. Pushing from development to staging is easy but what about from staging to live where there's constantly new customers and orders being created? Do I go the Apple route and post a "Inventory being updated" message. Any insights?

Thanks

Update: I guess I wasn't clear enough on my actual question. For those of you managing larger e-commerce websites, do you bring the site down momentarily for updates or is there another method, common or otherwise, that I am overlooking?

KTastrophy
  • 1,739
  • 15
  • 23

3 Answers3

2

Magento already has a Maintenance Mode should you need it. More discussion about it is here.

Generally all your changes will probably be custom modules, and each module has it's own version and set of applicable install/upgrade scripts. Whenever you increase the version number in a module's config.xml file Magento automatically finds and runs the corresponding upgrade script. If all your database changes are made via that script then you have nothing to worry about.
This is how I expect my staging-to-production sites to work and only very rarely do I need to make any other changes in the admin, exceptions are things like adjusting links in CMS content. I never copy data directly from the staging database.
More discussion about this is here.

Community
  • 1
  • 1
clockworkgeek
  • 37,650
  • 9
  • 89
  • 127
  • Thanks! Definitely helps, but what about products? I'm setting up a workflow where even they go through to dev -> staging -> production as well. In this case the only option I am aware of is working purely with the database and duplicating from staging to prod. Advice? – KTastrophy Nov 27 '10 at 16:49
  • If this can be done by product imports then it is only a case of uploading the same file to each server in turn. Not all product types can be defined that way. As yet I haven't found a neat solution to that and resort to re-entering them through the admin. – clockworkgeek Nov 29 '10 at 16:50
1

Your idea is a pretty good one, providing the interactive bits of the site are disabled - if you are uploading code/modifying databases then you don't want to introduce new data in that time due to the errors you might get.

Another way would be to schedule a cron job (or simply wait till 12AM and do it manually) to upload/change all the things you want uploaded/changed.

I can't really think of anything else right now - does magento have a way of disabling-while-updating?

Thanks,

James

Bojangles
  • 99,427
  • 50
  • 170
  • 208
1

In this case you should have upgrade plan in what times and dates the upgrades are allowed and during the update/upgrade maintenance mode should be on with correct http headers 503 Service Unavailable so search spiders/bots would understand the situation is temporary.

the way you display the maintenance mode is up to you. I'd suggest a rewrite rule to redirect all requests that are not from developers ip's to be redirected to maintenance page. So you still could use and perform the upgrades or setting changes yourself while others see the maintenance page

Anton S
  • 12,750
  • 2
  • 35
  • 37