Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

site create: allow custom domain configuration with subdomain based multisites #505

Open
1 task done
35grain opened this issue Jul 3, 2024 · 0 comments
Open
1 task done

Comments

@35grain
Copy link

35grain commented Jul 3, 2024

Feature Request

Describe your use case and the problem you are facing

In a subdomain based multisite installation, where the main site itself is using a subdomain e.g. a.example.com, all new sites are created with a 4th level domain. For example in this specific case, wp site create --slug=b would configure the new site to use b.a.example.com.

What if we would like to use 3rd level domains in the new sites or perhaps use a completely different domain? Currently this can be achieved by replacing the domain in the database tables: wp search-replace b.a.example.com b.example.com --all-tables --network. This is an extra step, however, and could likely be simplified.

Describe the solution you'd like

In addition to the --slug option, perhaps there could be an option to specify the base domain to which the slug is added? For example to configure b.example.com, the command could look something like wp site create --slug=b --base_domain=example.com. Or simply allow defining the whole URL at once by making use of the --url option wp site create --url="https://b.example.com" or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants