Migrating WPMU To Subdirectory
6 Steps to Move WPMU with Domain Mapping from Root Folder to Subdirector!
I really do appreciate the WordPress Community. Recently I had a lot of difficulties with the technical aspects of working with WordPress MU. I wanted to move all of the files from the root folder into a subdirectory. In the process I had a lot of help. I’m usually the silent reader – seldom do I post a comment. I’m like a sponge: soaking up all the information. Today, I like to contribute by sharing my tip bits here because I couldn’t find the information on the Internet that will perfectly solve my problem.
This is simple:
1) Create your subdirectory (example: /public_html/subdirectory/)
2) Move all of your WordPress MU files into the subdirectory.
3) Create a file in the root (/public_html/) and name it .htaccess
4) Go to the bottom and copy the code below and paste it into your .htaccess file (located in root (/public_html/). Be careful to paste the code in the empty .htaccess file because there are many .htaccess files.
5) If you are using domain mapping you will usually have the domain parked, so go to your cpanel and delete the domains you parked (pointing to the root /public_html/).
6) Now, this is the secret that took me 4 days to figure out with the help of my hosting company. They did a fantastic job. Go to your cpanel and instead of parking the domains, create it as an add-on domain pointing to the subdirectory you had created above. If you are unable to do for any reason contact your hosting company and they can manually place an add-on for the domain.
Code Below:
# Turn on rewrites.
RewriteEngine on
# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www.)?yourdomain.com$
# Only apply to URLs that aren’t already under folder.
RewriteCond %{REQUEST_URI} !^/your subdirectory path/
# Don’t apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all those to insert /folder.
RewriteRule ^(.*)$ /your subdirectory path/$1
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?yourdomain.com$
RewriteRule ^(/)?$ /your subdirectory path/index.php[L]
Copyright 2009 by Farting Camel
Comments
2 Comments
Leave a Reply
Recent Posts
Starbucks is not Vegetarian!
I am never a big Starbucks fan. Since I'm transiting from being a lacto-vegetarian to vegan (read my article on vegetarianism here), I have been avoiding Starbucks for its lattes, hot chocolates and frappacinos. But... more
My Invisalign Journey Starts Again, for the Second Time!
My journey in invisalign stopped for a year and I’m embarking on it again. Yes, my SECOND attempt in invisalign, in three years! Previously, I started invisalign on Sept 2008 and stopped around July 2010, 22... more
Farting Camel’s Guide to Citigroup
Farting Camel’s Guide to Stock Picking – Citigroup, Inc (C) Citigroup stock price has been very active lately not to mention how widely priced; trading as high as $5.06 to a low of $4.38 - just... more
Ancient Tibetan Rites of Rejuvenation Review – Week Four
In our rediscovery series on health, we examine the benefits of Peter Kelder’s Five Tibetan Rites. As we document our experience and progress, we hope you could observe and benefit from our experiment and review... more







This is such a simple solution. I searched the WP site and only found notes that it should not be attempted.
I am currently installing MU at http://www.astoundingtales.com and I wanted to install in a subdir, but use the root and also keep the files that I had there already.
You solution seems to work well (this is at 1and1.com hosting). I can create a blog with a unique subdomain and everything is reachable.
I did have a 500 error the first time I tried to access after I put the htaccess file in place, but not since. I don’t know what I might have done wrong, or maybe something was typed wrong.
Anyway,
Thanks.
[Translate]
Keith, you are welcome! I’m glad it worked for you. If you want to thank, thank the awesome WordPress community.
[Translate]