WordPress.org

Support

Support » Multisite » Changing Multi-Site from Sub-Directory to Sub-Domain

Changing Multi-Site from Sub-Directory to Sub-Domain

  • Was looking at this issue on another post here: http://wordpress.org/support/topic/how-do-you-go-from-multisite-subdomain-to-subdirectorygt?replies=8 — but I want subdomains NOT subdirectories.

    I had an MU installation that was set up to use subdomains. After upgrading it’s been changed to use subdirectories and as Andrea noted in the post above it’s making permalinks use ‘blog/’ (so that solves THAT mystery).

    I do need it to have new blogs as subdomains and not sure what steps and what order best to do this. Hoping I don’t have to re-install, as I botched the upgrade to 3.0 and ended up doing a lot of extra work:

    From what I’ve heard, you have to clear or drop your table in your mySQL database and re-install wordpress… Then you have to enable multisites again, and choose subdirectories instead of sub-domains.

    FYI, my wp-config.php has (which I shouldn’t have done, but did, and it’s working so I didn’t remove it):
    define( ‘MULTISITE’, true );

Viewing 15 replies - 16 through 30 (of 35 total)
  • Does this look to be good instructions to remove Multi-site? http://blog.ashfame.com/2010/07/remove-wordpress-multisite-data/

    Then to start over?

    anndonnelly – Don’t roll back or start over just yet.

    Unless you started from Single Site (which your first post says you were using WPMU with SubDomains), rolling back could kill a lot of things.

    Do you have a good back up of BEFORE you started upgrading?

    I have the database and wp-config.php before upgrade — not the other files.

    I only have the one site, not child sites — so would I lose anything if I go back?

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    put back the original config file that you had for starters.

    When I upload the pre-3.0 config file I get ‘error connecting to database’.

    When I upload config file as a regular 3.0 install W/O define MULTISITE – the front end of site is fine, but I cannot access admin (and it some of the paths to images not working).

    When I upload with config file more like a regular 3.0 install except WITH define MULTISITE (and just one NONCE_SALT define ‘put your unique phrase here’) – the site is fine except I cannot add any child sites. So I am at this point now….

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Scratch what I said before.

    you started with MU, so you do NOT want to use the new network features. you’re already running a network so you do not want to set it up.

    your config file needs to look like this, but with YOUR db details in it:

    http://trac.mu.wordpress.org/browser/trunk/wp-config-sample.php

    Sorry, which lines? I’m not getting an error message.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    edited my post.

    Example config had:
    define(‘VHOST’, ‘VHOSTSETTING’);
    $base = ‘BASE’;
    define(‘DOMAIN_CURRENT_SITE’, ‘current_site_domain’ );
    define(‘PATH_CURRENT_SITE’, ‘current_site_path’ );

    Do I need to change the first two of these settings? Mine is:
    define(‘VHOST’, ‘yes’);
    $base = ‘/’;
    define(‘DOMAIN_CURRENT_SITE’, ‘progressivesolar.ie’ );
    define(‘PATH_CURRENT_SITE’, ‘/’ );

    and these have values in my pre 3.0 file, should they remain?
    define(‘AUTH_KEY’, ‘put your unique phrase here’);
    define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
    define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
    define(‘NONCE_KEY’, ‘put your unique phrase here’);
    define(‘AUTH_SALT’, ‘put your unique phrase here’);
    define(‘LOGGED_IN_SALT’, ‘put your unique phrase here’);
    define(‘SECURE_AUTH_SALT’, ‘put your unique phrase here’);

    When I use it I get ‘error establishing a database connection’ – could this be down to the changes made to .htaccess at upgrade?

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    ‘error establishing a database connection’ means that in the wp-config.php file, either the database name, database user or database host is incorrect. that’s all.

    To answer your very first question in this thread:

    “Do I need to change the first two of these settings? Mine is:
    define(‘VHOST’, ‘yes’);”

    See where it says yes? That means it’s a subdomain install. Change it to no.

    that will not fix the error message though. you need to fix that too.

    I did double check and the database info is correct. Could it be something else? I had this issue when I upgraded it it was the table names I think.

    Do I need to change VHOST if I do want it to be subdomains?

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Okay, a few posts earlier you said it was a single site, but in another post said it was an upgraded WPMU site. which was it?

    Because if it was originally a WPMU site then the table names should have wp_1_whatever on them. you should never change those.

    If it WAS a single WP site and you enabled the network, then you would have had to start on 3.0.

    I really really need to know what you initially installed it as, or it’s going to get even more screwed up.

    It’s an upgraded MU site – with only one site in it? Would you still call that an MU site? I only started to use MU just before the upgrade to 3.0 so didn’t have a chance to add any more sites yet.

    I screwed it up at upgrade by adding that define MULTISITE and changing the wp_1_ to wp_ to get it to work 🙁

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Yes, the table with no wp_1 is causing wordpress to think it is a network install not an MU install. rename them back.

    unless… if you get the main site working, export out ALL the posts and content you want. Then blow it away and install 3.0.1 fresh and import your content.

    Are there certain tables that would just be wp_? This is where I went astray initially!

    Tempted to do a fresh install, but afraid I could lose something in export import. What would you do, Andrea? Though you wouldn’t be in this position! Client has already got some good results in Google so was hoping not to upset that too much, but it’s already change the Permalinks!

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Changing Multi-Site from Sub-Directory to Sub-Domain’ is closed to new replies.
Skip to toolbar