• Resolved davydov-denis

    (@davydov-denis)


    Dear all,

    I am migrating a single site installation sitting in /public_html/foo.com and domain bar.com (“foo” and “bar” are different for historic reasons, i.e. started with “foo.com” and changed the domain later to “bar.com”).
    I edited the .htaccess and wp-config.php by following the migration procedure for multisite. The transition appears to went ok and the main site is running,
    but I can’t create a subsites.

    I am not sure how should I setup the document root for the wildcard subdomains, currently I set it to:

    /public_html/foo.com/_wildcard_.bar.com

    but this folder is completely empty after the creation of the new subsite. So no wonder I can’t access:

    subsite.bar.com/wp-admin

    Clearly something is wrong in my setup, but the question is: how can I make it working?

    Regards,
    Denis.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter davydov-denis

    (@davydov-denis)

    Looks like I got this working by setting the root for wildcard subdomain to /public_html/foo.com

    although the before-you-create-a-network suggests that

    “WordPress should be run from the root of your webfolder (i.e. public_html) for subdomains to work correctly.”

    Looks like I got this working by setting the root for wildcard subdomain to /public_html/foo.com

    I saw your post yesterday, but couldn’t get a chance to respond.

    What you did is exactly what it should be. That’s because subsite’s subdomains are VIRTUAL, so they don’t have or need their own document roots: they should always be pointed to the document root of the primary domain/site.

    although the before-you-create-a-network suggests that

    “WordPress should be run from the root of your webfolder (i.e. public_html) for subdomains to work correctly.”

    This is talking about the primary domain/site itself — where the WordPress software is installed — and not the subsites/subdomains.

    The point of this recommendation is to run the primary site from a root domain or subdomain (eg example.com, corresponding to public_html), rather than from a path/subfolder (eg example.com/path/, corresponding to public_html/path/).

    But, in your case, it seems you’re using cPanel’s add-on domain feature, so your public_html/foo.com/ path actually maps to a top-level domain example.com — which satisfies the essence of that recommendation.

    Good luck!

    Thread Starter davydov-denis

    (@davydov-denis)

    Thanks for clarification, @gappiah .

    Sincerely,
    Denis.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multisite in a subdirectory and wildcard subdomains’ is closed to new replies.