If you successfully set up your WordPress hosting environment using Trellis, and now you’re randomly getting an SSL, this is what you can do to fix it.
Re-provision the Server / Hosting Environment
Make sure your virtual box is booted up locally.
Run the re-provision command with the Let’s Encrypt tag.
Running this command will not affect your application.
Caution: If you made manual customization to your hosting environment outside of Trellis, (e.g. you manually added a few rewrite rules to your Nginx block), they might be overwritten by this command.
Trellis Re-provision Let’s Encrypt Command
1 |
ansible-playbook server.yml -e env<span class="token operator">=</span><span class="token operator"><</span>environment<span class="token operator">></span> --tags<span class="token operator">=letsencrypt</span> |
Applied Example
1 |
ansible-playbook server.yml -e env<span class="token operator">=production</span> --tags<span class="token operator">=letsencrypt</span> |
Reference: Roots Trellis Docs, https://roots.io/trellis/docs/remote-server-setup/