Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save scattershot-code/1853eec089163d501c228cf80e4978f4 to your computer and use it in GitHub Desktop.
Save scattershot-code/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".
@scattershot-code
Copy link
Author

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