Question

How do you set up a development and test server for staging production server changes?

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?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
April 11, 2025

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

alexdo
Site Moderator
Site Moderator badge
April 14, 2025

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

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

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.