• Hello, I am using a WP multi-site
    When I create a new site using wp-cli no matter how I approach it I cannot figure how to create a root domain as the blog url ie; example.com NOT example.com.mainsite.com or mainsite.com/example.com

    Each of my client sites get their own domain.com in my case.

    I cannot find a command to set the blog url, only the site url which is a different issue all together.

    What sayeth the group ?

    Jay
    CompMatter

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    I moved your topic to Networking WordPress so those that really know multisite can contribute. I initially thought this was a CLI question, but then decided the very nature of multisite is the issue more than what you can do through CLI.

    My understanding is, as far as WP is concerned, the only valid URLs for blogs is either blog-name.main-site.com/ or main-site.com/blog-name/. You can do other formats through hosts and rewrites external to WP, but WP needs to be configured to accept one of the previously mentioned formats. If any multi-site experts knows differently, please do enlighten us.

    Thread Starter compumatter

    (@compumatter)

    Thank you. Maybe it will get more ‘press’ here 😉

    I have verified that wp-cli does not handle modifying the blog url. However, since it is a required url to display the site properly, seems a candidate for future modifications of wp-cli

    I don’t think this is a multi-site thing. It’s an every site thing. IF you are using a root domain and not a subdomain.

    I dont understand what blog url is. The siteurl of a site should change the domain of the site. For example if I the site was created as ‘http://domain.com/subsite’, changing the siteurl to ‘http://domain2.com’ should work.

    I do map my WP multisite subdirectory to other domains but I use the Domain Mapping plugin.
    https://codex.wordpress.org/WordPress_Multisite_Domain_Mapping

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WP-CLI blog url as “root domain”’ is closed to new replies.