Report this

What is the reason for this report?

How to create/manage a development, staging and production site for Opencart?

Posted on January 16, 2020

Currently opencart is at /var/www/opencart and if I want to change something I use filezilla to paste over the existing content.

I want to create a workflow of development then staging to test and then production when everything looks fine. I would need to keep track of the changes/versions in case of needing to rollback.

Should I create stagine.example.com to test the staging phase on the same server?

For development, I was thinking on creating a localhost config file for nginx.

Server is LEMP with MariaDB, PHP7.2 and Opencart 2.3.0.2



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @NGINXuser,

What I believe the best approach should be a git/gitlab repo. From there you can create a master repository which would be for your production website.

If you wish to have a test or staging environment you can always just fork/create a branch repository and make the changes there. As soon as you are sure the changes are actually working, you can merge the branches and pull them on your master environment.

Those are the basics which should be enough for your goal.

Regards, KDSys

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.