I’ve inherited a server with 6 sites on, only two of them are WordPress based, the others are simple one page HTML builds.
I’ve setup Trellis and Bedrock for the two WP sites. I’m now trying to find out what I need to add/change to provision the other site directories, which will not contain a WordPress site.
WordPress Sites config:
wordpress_sites:
mywpsite.co.uk:
site_hosts:
- canonical: mywpsite.test
redirects:
- www.mywpsite.test
local_path: ../mywpsite # path targeting local Bedrock site directory (relative to Ansible root)
admin_email: admin@example.test
multisite:
enabled: false
ssl:
enabled: true
provider: self-signed
cache:
enabled: false
local_path: ../mywpsite
has the bedrock setup as normal.
HTML sites
I suspect I still need to add an entry here for the non-wp site still, therefore I would have:
wordpress_sites:
mywpsite.co.uk:
site_hosts:
- canonical: mywpsite.test
redirects:
- www.mywpsite.test
local_path: ../mywpsite # path targeting local Bedrock site directory (relative to Ansible root)
admin_email: admin@example.test
multisite:
enabled: false
ssl:
enabled: true
provider: self-signed
cache:
enabled: false
myhtmlsite.co.uk:
site_hosts:
- canonical: myhtmlsite.test
redirects:
- www.myhtmlsite.test
local_path: ../myhtmlsite # path targeting local Bedrock site directory (relative to Ansible root)
admin_email: admin@example.test
multisite:
enabled: false
ssl:
enabled: true
provider: self-signed
cache:
enabled: false
Inside the ../myhtmlsite
directory, I suspect I should keep the /web directory and then simply drop in the HTML files there. Not needing to include any of the other regular files added by composer-bedrock?
Normally, I would also be setting passwords inside: trellis/group_vars/development/vault.yml - the HTML sites need no database or passwords.
I made the above changes, tried a vagrant provision on my local and got the following:
Invalid WordPress sites configuration: site names in
wordpress_sites
musthave matching entry in
vault_wordpress_sites
.Sites without a matching vault entry:
myhtmlsite.co.uk
Update
group_vars/development/vault.yml
to continue.Docs: WordPress Sites | Trellis Docs | Roots
fatal: [default]: FAILED! => {“changed”: false}
If it creates a database but doesn’t use it, that is fine, just not sure if there is a way to simply ignore the database/wordpress creation steps for this scenario?