Skip to content

Instantly share code, notes, and snippets.

@dncnmckn
Created February 10, 2020 12:47
Show Gist options
  • Save dncnmckn/1853eec089163d501c228cf80e4978f4 to your computer and use it in GitHub Desktop.
Save dncnmckn/1853eec089163d501c228cf80e4978f4 to your computer and use it in GitHub Desktop.
Fixing wildcard subdomain in channel for WordPress Multisite
When you manually create a subdomain using Cpanel, it creates a new document root at the same level as your public_html folder.
Since WordPress Multisite needs to have all subdomains use the same document root, you have to change the Document Root for your subdomain to "public_html" without the quotation marks.
So if your multisite network is installed at mydomain.tld, and you manually add subdomain mysub.mydomain.tld via Cpanel, you have to then change the Document Root setting for mysub.mydomain.tld from "/mysub.mydomain.tld" to "public_html".
@dncnmckn
Copy link
Author

dncnmckn commented May 7, 2020

When you manually create a subdomain using Cpanel, it creates a new document root at the same level as your public_html folder.

Since WordPress Multisite needs to have all subdomains use the same document root, you have to change the Document Root for your subdomain to "public_html" without the quotation marks.

So if your multisite network is installed at mydomain.tld, and you manually add subdomain mysub.mydomain.tld via Cpanel, you have to then change the Document Root setting for mysub.mydomain.tld from "/mysub.mydomain.tld" to "public_html".

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