As a former programmer, I learned the hard way not to mess with production until you were sure you had tested all changes thoroughly. How do you set up a DigitalOcean droplet to enable such staging of changes?
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!
Hey @CharleyKiser 👋
One simple approach is to spin up a separate Droplet that mirrors your production environment as closely as possible, same OS, web server, database, WordPress version, etc. You can take a snapshot of your production Droplet and create a new one from it, or set up a fresh Droplet and restore from a backup or export.
Make sure to:
Use a different subdomain like staging.example.com
Restrict access with a password or IP rules so it’s not publicly indexed
Sync data from production (carefully) if needed, but avoid accidentally sending real emails or triggering live services
If you’re using App Platform or automation tools like Terraform, you can replicate environments even more cleanly.
- Bobby
Heya, @charleykiser
You can use Docker Compose to containerise your entire app stack (e.g., NGINX, PHP, MySQL, WordPress). Then you can spin up an identical staging environment on the same droplet, a separate one, or even locally.
I believe this can help you to manage everything.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.