How to Move Your WordPress Blog from a Subdirectroy to Root

Sun, Aug 16, 2009

Moving WordPress

Always be sure to fully back up your blog before attempting a move.

Many times, new bloggers might put their blog in a subdirectory, like /blog or they did not realize that when you install WordPress manually, it will be installed in the /wordpress directory. If this is the case and you want to move your blog out of a subdirectory and into the root folder of your site (i.e. you domain name), then follow the instructions in the video below.

If you have any questions, please comment below.

, ,
John's Wishlist

83 Responses to “How to Move Your WordPress Blog from a Subdirectroy to Root”

  1. clean and green Says:

    Could i able to move the sub directory to root folder without ftp or wp-config file access? see the sample

  2. John Hoff Says:

    If not using FTP then you’d need to log into the web hosting control panel and use the File Manager to move the files. The wp-config file will need to be moved as will all your other files.

  3. Venkat Says:

    You saved my Day! I built website for my client in wordpress, I know I can move it to root easily. Without your video, I could have spend a complete day to finish the job, with you help I did in an hour confidently.


  4. John Hoff Says:

    Hey my pleasure Venkat. I hate when one task takes an entire day to do. Glad it saved you some time.

  5. Laurie Gattis Says:

    You guys ROCK! I have been spinning my wheels with this and I finally found YOUR site! Lost my database and had to start over a couple of days ago. Will definitely add you to my new blog when I get it all updated. THANK YOU THANK YOU!

  6. John Hoff Says:

    Hi Laurie.

    No problem. Glad to of helped. Be sure to check out my new site, Blog Training Classroom for more videos.

  7. Falmung Says:

    Thanks. this helped a lot.

  8. John Hoff Says:

    You got it, Falmung.

  9. Yong Says:

    Oh boy. So I’m on a Mac platform. How do I get the database that you’re talking using Fetch?

  10. John Hoff Says:

    Hi Yong. I’m sure a text editor will do. Download it and see if it opens it up.

  11. hak Says:

    this is perfect thanks!

  12. John Hoff Says:

    hak, glad you got it. No problem.

  13. lynnspain Says:

    Thank you this is well presented and clear, making it so much easier for those of us who either do not understand these things well, or just do not do them very often.

  14. John Hoff Says:

    Hi lynnspain,

    No problem. Glad I was able to help. Be sure to subscribe to my YouTube channel as well.

  15. John Hoff Says:

    Hi Suzanne. You got it. Thanks for the comment.

  16. Petur Says:

    followed your very helpful video till the Import of the SQL file.
    In my case there is no import button in my database setup (that otherwise looks the same as yours.
    Can you suggest another way to get my exported file back in?

    best regards

  17. John Hoff Says:

    Hi Petur. Since I’m not familiar with your database interface, I’d say your best bet would be to ask your hosting provider.

  18. Debie Says:

    Thanks so much for such a helpful tutorial! It made the move mostly painless (I somehow lost the text in my sidebar widgets – any idea how to keep those next time?)

    Thanks for taking the time to create this video and show us how simple the process is.

  19. John Hoff Says:

    Hi Debie,

    No problem.

    Not sure about widgets thing. Mine always moves over just fine. Or at least I think they do. To be honest, I haven’t done a move in quite a while now.

  20. Ryan John Says:

    Thanks for a good tutorial on the actual moving of the blog, this is exactly what I need to do with mine. However is there an easy way to maintain the links into the site? I know I can use 301 redirects on the pages individually, but is there not perhaps a script I can add to .htaccess or something to redirect all pages from the subdirectory to the same URL just with the subdirectory removed.

    Help appreciated as I really don’t want to lose my position in google and pagerank by moving to the root.

  21. John Hoff Says:

    Hi Ryan, there are a few plugins out there which might be able to help.

    Here’s one here.

    If that doesn’t work, do a Google search for similar plugins.

  22. Ryan John Says:

    That’s looks ideal John, I don’t know how I didn’t spot something like that myself. Think I’ll do a dummy test first then bite the bullet. Thank You.

  23. Timmy Howard Says:

    Great write up guys you saved my ass. Thankyou thankyou thankyou!!


  24. yourstoryclub Says:

    wow!!! so easy… I shall try it – I am really afraid to do any change after reading CODEX and other blogs.

  25. yourstoryclub Says:

    finger crossed – all step done… given import command and now it is taking time… for last 15 min I am restless… 3% completed… do not know my fate. My SQL file size is ~8MB. Pray for me

  26. yourstoryclub Says:

    Finally I did!!! It is working

    I changed char set to 16 while exporting database because I am using some Indian charset also. But luckily I also exported with setting char set 8. First one failed and I was cursing you :-) then I tried with later sql and it all worked.

    Thank you sooooooo mucccchhhhhh…. My regards

  27. John Hoff Says:

    Awesome. Glad you got it. I know, it’s nerve racking when you hit that “go” button.

  28. CharmaDesignStudio Says:

    Hi John,

    Thanks for this!

    Everything has gone to plan except when importing the file back to phpMyAdmin…I got a sever error and think I need to used this “BIG DUMP” video you speak about but I can’t seem to find the link to it!? Please help as the website is now sitting broken for everyone to see….


  29. John Hoff Says:

    An easy way to find it is by going to Google and doing a search for it along with


  1. [...] How to Move Your WordPress Blog from a Subdirectroy to Root [...]

  2. [...] NewsPlant these Companions with Tomatoes – Modern Survival Blog – surviving uncertain timesVideo: How to Move WordPress from a Subdirectroy to Root var ajax = new Array(); function TrackClick(link,title) { var index = ajax.length; ajax[index] = [...]

Leave a Reply