Going live with Trellis

I have a new Trellis site which has been developed on my local (example.test) and staging (staging.example.com) sites. They are hosted on Digital Ocean droplets.

I have also got a production server, currently set to production.example.com (canonical name and redirects) in my wordpress_sites.yml

I have an existing site hosted elsewhere, and I would like to be able to go live with minimum downtime.

My queries are as follows:
• Because my DNS is pointed elsewhere (my existing site), I can’t provision the production server with SSL turned on. After I point my DNS to my new Trellis site, can I re-provision the server with SSL turned on without issues?
• My canonical name is currently production.example.com because example.com on its own just points to my existing site on another server. After I change my DNS towards my new Trellis site, can I change the canonical name / redirects and re-provision without issues?
• I have a subdomain (subdomain.example.com), which I wish to redirect to an external URL. What’s the best way to do this in Trellis? My default is to add a redirect in .htaccess
• I would like to set up Cloudflare as a caching/CDN layer. Are there any known issues for Trellis/Cloudflare interaction?

Thanks for the help!

  • Yes, but you can also deploy with a manual cert (you can generate Let’s Encrypt certs elsewhere and provide them to Trellis manually) at first and then switch to Let’s Encrypt so that it’s 100% SSL enabled from the start.

  • Yes, re-provisioning is always safe

  • If the subdomain is doing nothing but redirecting, I wouldn’t use Trellis to do it. Most registrars have built-in functionality for this. If you want to use Trellis to do it there should be some existing topics that cover it.

  • No

1 Like

Thanks – very helpful.

Concerning the redirection from a subdomain, would it be also worth using the registrar for redirecting from ‘www.’ to non-www or from non-www to ‘www.’ domains?
Currently trellis is used instead for a proper HTTP redirection.

Trellis is doing a proper HTTP redirection, I’m not sure what you mean. It’s a 301 redirect, and you should use Trellis to do it as it would likely be faster than doing requests to different servers.

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.