Dear community!
I have an existing Trellis project that I’m modernizing. After upgrading my MacBook, I’ve successfully migrated to Lima for local development, which is working great.
Working:
- Development environment (Lima setup)
- Staging environment (provisioned and deployed successfully on new subdomain)
- New site created within existing Trellis project structure
The problem: My production environment is currently:
- Running the old site with the legacy deployment system
- Using the same domain/URL that the new site needs to use
- Hosted on a separate Digital Ocean droplet (Ubuntu 20.04)
- Still serving live traffic
Question
I’m at a decision point for the production deployment strategy and would appreciate guidance on the best approach:
Option A: Create New Droplet
- Provision entirely new Digital Ocean droplet
- Deploy new site to fresh server
- Update DNS to point to new server
- Decommission old droplet after successful migration
Option B: Migrate Existing Droplet
- Work with the current production droplet
- Somehow transition from old deployment to Trellis on same server
- Maintain same IP address
Considerations
- Downtime: Minimizing downtime is important as this is a live production site
- Data Migration: DB data will be migrated from the Staging Site via WP CLI and search-replace feature - No Uploads needed to migrate
- DNS: Currently pointing to existing server IP
- Rollback / Troubleshooting: Ideally, the whole process is revertible if the deployment keeps failing…
Questions
- What’s the recommended approach for this type of migration?
- If going with Option A (new droplet), what’s the best practice for handling the domain transition?
- If going with Option B (existing server), is it feasible to migrate from a legacy deployment to Trellis on the same server?
Kind regards, Dominik