WordPress Multisite Subdomain Not Working

If you have encountered a problem about your WordPress Multisite subdomain setup and it didn’t work even though you have followed the instruction thoroughly, the best solution is to submit a ticket your web hosting provider.

But before you do contact your web hosting provider, please make sure you have tried to do the following solution below especially if you are using a web hosting that uses cPanel like Hostgator or BlueHost .

Copy and Replace your .Htaccess with the following code below:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

Add the code before /* That’s all, stop editing! Happy blogging. */ in your wp-config.php file.
/* Multisite */
define( ‘WP_ALLOW_MULTISITE’, true );
define(‘MULTISITE’, true);
define(‘SUBDOMAIN_INSTALL’, true);
define(‘DOMAIN_CURRENT_SITE’, ‘yourdomain.com’);
define(‘PATH_CURRENT_SITE’, ‘/’);
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOG_ID_CURRENT_SITE’, 1);

Go to Subdomain and create a wildcard subdomain
To create wild card subdomain, go to subdomain and add *.yourdomain.com. Make sure it is pointed to the folder where you have installed your WordPress Multisite website.

cPanel Bug.
Go to Advanced DNS Editor and delete the record webdisk.yourdomain.com if it exist. This is a cPanel bug which get automatically generated when your create a wildcard subdomain.

Create a folder called blogs.dir

Go to your  wp-contents then create a new folder called blogs.dir if it does not exist and set the file permission to 755.3


Comments are closed.

Related Posts