roots / docs

📝 Documentation for Roots projects
https://roots.io/docs/
168 stars 183 forks source link

Directory structure for multiple sites should be explained on the docs. #120

Open nextgenthemes opened 6 years ago

nextgenthemes commented 6 years ago

Submit a feature request or bug report


Suggestion for new/improved documentation

So the recommended directly structure is this:

example.com/      # → Root folder for the project
├── trellis/      # → Your clone of this repository
└── site/         # → A Bedrock-based WordPress site
    └── web/
        ├── app/  # → WordPress content directory (themes, plugins, etc.)
        └── wp/   # → WordPress core (don't touch!)

From what I have read it seems that this (below) is the recommended what for multiple sites. Am I correct about that? I saw a thread dating back to 2015 on your discourse. And this question got asked often. So I suggest to document this so nobody asks it again. I admit I not really read all but ...

websites/      # → Root folder for the project
├── trellis/      # → Your clone of this repository
└── example.com/         # → A Bedrock-based WordPress site
    └── web/
        ├── app/  # → WordPress content directory (themes, plugins, etc.)
        └── wp/   # → WordPress core (don't touch!)
└── another-example.com/         # → A Bedrock-based WordPress site
    └── web/
        ├── app/  # → WordPress content directory (themes, plugins, etc.)
        └── wp/   # → WordPress core (don't touch!)

So if this is the recommended way then why is the root folder of the example structure called like a domain? I think its confusing because the wordpress-sites.yml also suggests that this is the way it should be done.

One could also do this. And then change the Vangrant box IP and have completely separate vagrant boxes? What are the benefits of this kind of setup? Or should that be avoided? Document this?

example.com/      # → Root folder for the project
├── trellis/      # → Your clone of this repository
└── site/         # → A Bedrock-based WordPress site
    └── web/
        ├── app/  # → WordPress content directory (themes, plugins, etc.)
        └── wp/   # → WordPress core (don't touch!)
another-example.com/      # → Root folder for the project
├── trellis/      # → Your clone of this repository
└── site/         # → A Bedrock-based WordPress site
    └── web/
        ├── app/  # → WordPress content directory (themes, plugins, etc.)
        └── wp/   # → WordPress core (don't touch!)

I think in general the docs are very basic. I already gave trellis a test spin but without my already pretty good Linux knowledge I would be lost I think.

swalkinshaw commented 6 years ago

Agreed these kind of of setups could be better documented. We try and keep it simple with one recommended setup to begin with. But these could be explained in another more advanced section.

To answer your question, both of those setups are completely valid. It entirely depends on your needs. In the first one, your Trellis configuration applies to every site. You could make some changes per site, but it's a little more difficult.

In the second setup, it's obviously easier to customize each site/server but has a lot of duplication.

It also depends what server setup you want. 1 server for n sites, or 1-1 server to site.

Each scenario could be documented 👍