How to Move WordPress from a Subdirectory to Root and Vice-Versa
Note: Before attempting any of these techniques, but sure to take a backup of your database and store it in a safe place–just in-case of disaster
Also, I do not attempt to address issues with any custom entries in .httaccess that you may have on your site.
How to move WordPress from Your URL Root Directory to a Subdirectory
How to Move WordPress from a Subdirectory to the Root URL of Your Site
Related posts:
- How to Move WordPress to a Different Server and Web Address How to Move Your WordPress Blog to a Different...
- Easy 5-Step WordPress Install Note: The following is made available under GPL from...





























Hello,
I can’t see the video your site.
Thanks.
good video thanks
Thankyou so much – very helpful video – stopped me pulling my hair out.
thanks, i just moved my blog at rubyrescue.com to /blog – your search/replace suggestion worked perfectly though i used mysqldump and sed.
Help! Your second video was great but I was looking for the video that keeps your blog in a subdirectory but makes it look like it’s in the root so that my url doesn’t contain the “/wordpress” in it. Can you help me? Thank you so much!
Alex
@Alex: I haven’t created a video showing that yet, but the written directions can be found at the link below.
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
Wow! Thank you for this great video! I have follow the instructions you told in the video and I was able to move my Wordpress blog from a sub-directory to my root-directory.
I am very thankful. So thank you!
Friendly greetings,
Archana
thanks, this was very helpful, straight to the point and most important, quick.
Ack!
I did the tutorial.. followed it to the T .. and now I can’t access wp-admin, and the site doesn’t show up.
I did notice a new file show up in my directory that I could alter, but couldn’t delete. It started with “.nfs00000…” etc
Any thoughts? I’ve still got phpmyadmin open and hoping to get this fixed. Ack!
http://www.verdecamp.com/wp-admin/
p.s. I’ve put up a temporary index.html page for the time being.
I sort of undid what I had done.. and got things back to normal-ish.
*sigh. thx for the tutorials, though..
excellent video, much easier to follow than the written examples. I just moved our corp blog to the root directory. 500 instances of the domain name change in the DB. Keep up the good work!
Thanks a million for the video! I couldn’t figure it out, how to move from root to subdirectory, your SQL walkthrough was excellent and helped me migrate my WP blog to a subdirectory where I needed it. Super job.
ken c
Oh dear…panic! I’m following the instructions in your tutorial, but when it came time to import the database file (after I did the “find and replace” and saved), I found that I have no “import” tab in my phpmyAdmin! I did some research and found that you can apparently import database files via the “SQL” tab, but the file was too big to be uploaded, so I had to zip it. And now when I upload the zipped file, I get this error message:
#1064 – You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘PK’ at line 1
…and there is no change in my list of database tables, so it definitely looks like nothing has imported.
I’m officially in way over my head…yikes! Any thoughts on what I could be doing wrong?
Looks like it was an issue on my web host’s end. All fixed!
A very helpful tutorial – thank you!
Your a life-saver! I moved my site to a subdirectory and was unable to access the wordpress dashboard. Your video instructions are clear and easy to follow. Thanks again.
I’m SO grateful for this tutorial. Figuring all this out with my own uneducated puny brain would have taken about a year I reckon! Thank you very much.
Bless you for this! I’m trying to exactly this process for a friend and I’m not a Wordpress expert by any means! Really good tutorial – thank you very much.
Best wishes – Steve.
Thanks for the tutorial, i already move my blog.
Dini
Thank you very much for this and all the other videos you have put together. They have helped me from hours and hours of trial and error.
bm
Figaro,
Like most of the comments above, I have to say, “THANKS!” to you for providing these videos. I’m a ‘newbie’, and I spent a LOT of time ‘Googling’ information on how to move my blog from the root to a subdir. I read through all of the results, but they were still daunting, inlcuding those provide by WordPress! I believe I found your videos through a reply you made in a forum. I am so GLAD! Your video made it very easy to accomplish my goal and it saved me countless hours of fumbling (and probably mistakes) that I just can’t afford right now.
I will definitely utilize whatever tips & training I can get from you or your “educhalk.org” site with much gratitude.
Thanks, again.
Hi!
Thank you so much for this tutorial, it was a lifesaver for me! Two questions though:
1. I’m not able to access the wp-admin login area or dashboard now. However, my site appears to be displaying correctly on the front-end. The error on the admin login page is:
Warning: Cannot modify header information – headers already sent by (output started at /home/content/23/5049323/html/wp-content/plugins/nextgen-gallery/widgets/widgets.php:989) in /home/content/23/5049323/html/wp-includes/pluggable.php on line 865
Any thoughts as to how I can get access to to the admin area?
2. I’m using the Nextgen Gallery plugin (which seems like it might be a cause of the error the admin panel is giving me) and on the front-end, it doesn’t seem to be accessing the images that were previously displaying through this plugin.
Your help would be greatly appreciated!
Thanks again
Hi again!
I’ve been successfully able to disable the plugin via my database, but it now seems that my home (or index.php from wordpress) is correct, but my posts & pages aren’t referencing my new site.
Oh, and by the way I moved my wordpress install from a folder called /site/ to the root directory.
Any help would be super!
@Leigh: Sounds like you didn’t update the url in the database…the video shows how to do this.
Thanks for this tutorial, really made it simple to understand and easy to do.
Thanks again,
William
Thank you so much for such a clear, concise tutorial. It allowed me to move a client’s blog to a subdirectory quickly and easily. Thanks!
You’re welcome Sherrie…glad it helped.
Thanks a lot that is one of the easiest to follow tutorials I have seen.
I hate all the databse stuff but feel confident I can move my new blog to the root directory without any issues now. Thanks
@Amanda
Yikes! I just got the same error message:
#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘reikiscene.com/blog
SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”‘ at line 1
Amanda, how did you fix this?
It work! Woo hoo. Great tutorial.
Hello great tutorial. All appeared to work ok, but…. now my links to my Contact and Privacy pages, as well as most side bar links are getting Internal Server Error 500. I’ve written to my server admin for help as he helped me with first installation, but just wanted to say, I thought this turorial was fantastic!! Thank you so much for the help. The blog is now here: http://safaritosuccess.com/travelblog
Happy 2010!!
VivBounty
@VivBounty: Try resetting your permalinks…set them to default and see if that clears the problem. If it does, then set them back to what you had.
@figaro
OMG, What a fantastic rescue angel you are!! This is the quickest fix for any problem I’ve had online. I looked at my permalinks and found that I had to re-write my .htaccess file. All done and all working wonderfully. Thank you so much and again Prosperous Blessings for 2010!
Hello figaro,
Have you any idea how to get my search to work please? I’m now getting an error 404 page.
all your videos are the best especially the one titled “changed my wordpress settings” and got locked out. This happened to me when I was trying to keep my wordpress files in the same subdirector while copying index.php and the htaccess file.
basically what i wanted to do was to have the effect of mydomain.com and still storying the wordpress files in mydomain.com/wordpress
YOU ROCK MY WORLD..lol. really you saved me a lot of aggravation. You should put a paypal donations tab somewhere here. I will donate to you.
@SammyB: Thanks…glad it helped. There is a donations button in the sidebar.
Does this not work with widgets? This process brought over our site just fine (after we changed the image tags to the new image locations). However, the move seemed to break all of our widgets. These were used for primarily side menus.
Thank you for the detailed video!
@Steve: Yea, I’ve seen that problem on a couple of sites lately…haven’t had a change to troubleshoot it, but seems with the latest versions of WP there is a problem with the new site recognizing the widgets.
Everything went fine, but tag and category URLS do not redirect to new location. The old tag & category URLS go 404. How do I change it so ALL of these go 301 to new location.
Excellent instructional video. Simple clean and precise. Will be trying this example on on of my clients blogs. Thanks.
Thanks for your very easy to follow and interesting tutorial. I followed your instructions and had no problem switching my blog from a subdirectory back to the root! Thanks again for your time and expertise!
This tutorial is a model of clarity and helpfulness. Thanks so much for taking the time to create it.