Moving from subdirectory to root (11 posts)

  1. billsaysthis
    Posted 5 years ago #

    In order to test I installed the 3.0 beta in a subdirectory but now that its ready to go I'd like to move it to root.

    The existing, pre-3.0 page on moving doesn't cover how to do this with the new version. WPMU docs are a little sketchy on the topic and I'm not sure that info is correct for WP3.

  2. Which WPMU doc?

    I just did that myself and it's more complicated than WP normal.

    I moved it, and then went into my database and searched for all instances in all tables of .com/subdir and replaced with .com/ which seemed to work.

    You also have to change the wp-config.php file.

  3. billsaysthis
    Posted 5 years ago #

    There wasn't an actual WPMU doc, just some forum posts, and they suggested doing what you did. I just don't want to do that unless that's the 'official' instruction.

  4. Andrea_r would be able to describe it better, but that was the easiest way for me. I suppose you could go in, change the blog URLs for each blog on your MU site, and do it that way, but you'd still have to run a search and replace (either via plugin or SQL) to change links in posts. At that point, you may as well just do it by SQL and pray you never move again ;)

  5. billsaysthis
    Posted 5 years ago #

    I did this as best I could figure. The main page of the main (first created, shows at root) blog shows properly, all other pages on this and the other blogs get 500 errors.

    I updated wp-config.php plus these tables:

    • wp_site
    • wp_blogs
    • wp_N_options (where N is nil for root blog and 2, 3 and 4 for the others)
    • wp_sitemeta (siteurl)


  6. billsaysthis
    Posted 5 years ago #

    Additional info: If I leave the default permalink (?p=post_id, ?m=month) the post and archive links work correctly. Other blogs still fubar'ed though.

  7. Did you remember to move your .htaccess file as well?

    Right now I have this sitting in my .htaccess to catch anything I forgot to move:
    RewriteRule ^blog(.*) http://www.ipstenu.org$1 [L,R=301]

  8. billsaysthis
    Posted 5 years ago #

    I used an SFTP client (Transmit) and moved the entire contents of the blog folder to my root. In fact I had to explicitly confirm that overwriting .htaccess was okay.

  9. *puts on Macintosh Hat*

    In your .htaccess and in your index.php make sure you're not specifying the subfolder.

  10. billsaysthis
    Posted 5 years ago #

    Holy schmolies, that was it. I missed the Rewrite base at the top of the file, fixed now.

    Muchas gracias, amigo!

  11. You're welcome. :)

Topic Closed

This topic has been closed to new replies.

About this Topic