From Subdirectories to Subdomains, how to change WPMU after the MU install
-
I changed my site from EXAMPLE.COM/USER to USER.EXAMPLE.COM in my WordPress MU install… Perfect for (very) small networks – not so good for large networks.
How it works
Many WordPress Network Administrators are familiar with the following:
Addresses of Sites in your Network
The primary information in this section involves the decision to use sub-domains or sub-directories for your sites. This means each additional site in your network will be created as a new virtual sub-domain or sub-directory. Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. You cannot change this later.
YOU CAN CHANGE IT!
This is a quick tutorial for for medium to advanced WordPress Network (MultiUser) administrators.
Problem: I installed the WordPress Network (WordPress MU) with user SubDirectories instead of SubDomains. Now, I want to change it. My host provider allows wildcard subdomains (https://*.example.com) so how do I fix this?
Solution: After looking online at the www.remarpro.com forums – like here and here – I stopped at this post, Adam Wulf’s, Changing WordPress Mu from Subdomains to Subdirectories. Then it hit me.
First, I created wildcard subdomain (as I said before, my host provider allows wildcard domains and documentation how to enable it). Next, I went to my ‘wp-config.php” and changed following line from:
define( 'SUBDOMAIN_INSTALL', false);
To this line:
define( 'SUBDOMAIN_INSTALL', true);
Then (for larger networks, this is not the best solution), I went to Network Admin > Sites page. I noticed that the values for Domain have reset to the default domain. I clicked on Edit, under the Domain value.
For each site, I changed the Domain field from the default example.com site to the new site.example.com site (I used the value in the Path field, making sure I kept the “/” symble in the the Path field).
I tested the WordPress site and everything is in working order. This was an issue I was able to correct rather quickly after initial install, so as I said before, larger networks would not benefit from this solution. If you have done this, and have some comments, please let me know how it went for you.
- The topic ‘From Subdirectories to Subdomains, how to change WPMU after the MU install’ is closed to new replies.