WordPress.org

Forums

[resolved] How do you change from Subdirectory install to Subdomain install (5 posts)

  1. Zachary DuBois
    Member
    Posted 2 years ago #

    Hi,
    I have a WordPress Multisite network that was setup with subdirectories. I have a wildcard DNS record now and would like to change it to subdomain for ease of use an slug conflicts. I changed my wp-config.php to define('SUBDOMAIN_INSTALL', false); and now when I go to /wp-admin/network/sites.php all the domains are set to the main site domain and I can't edit them to a subdomain. It will only give me the option for a subdirectory path.

    Basically I need to know how to switch from a subdirectory install to a subdomain. Do I need to edit my Ubuntu 12.04 LTS virtual hosts? .htaccess? wp-config.php? I have all the following plugins installed (Incase there are problems with any of them).

    • Bad Behavior
    • Blubrry PowerPress
    • BuddyPress
    • Flowplayer 5 for WordPress
    • Jetpack by WordPress.com
    • SI CAPTCHA Anti-Spam
    • WordPress MU Domain Mapping
    • WP Maintenance Mode

    Thanks for anyone that helps. I really need this fixed fast.

  2. You have to edit your database and fix everything there.

    Look in the table wp_blog and edit the paths to be correct. So if you have one with domain of foo.domain.com and path of / you change that to domain domain.com and path /foo/

  3. Zachary DuBois
    Member
    Posted 2 years ago #

    I wanted to change from subdirectories to subdomains. Not vise versa. The original post I made is wrong. I had the define('SUBDOMAIN-INSTALL', true); not false.

  4. Zachary DuBois
    Member
    Posted 2 years ago #

    I just did your steps in reverse. They didn't work but if you do Network Admin > Sites and edit each site. Check the update URL checkbox and save after editing the database, it worked flawlessly.

  5. thetechnologyvault
    Member
    Posted 1 year ago #

    I've been trying to change my blog from http://prohealthcareproducts.com/blog/ to http://blog.prohealthcareproducts.com. I found this post and tried to use the wp_blogs table update technique described, but it didn't work. It seems like it's a lot more complicated than that.

    Does anyone else have a more thorough recommendation?

    I'm trying to set up a WordPress MultiSite, and I need to have each of my sites be subdomains of prohealthcareproducts.com

Topic Closed

This topic has been closed to new replies.

About this Topic