Support » Fixing WordPress » Move blog from /site to main directory

  • Hi,

    I have a blog that I have built that is in a sub-directory folder:

    However I want to move so it’s in the main folder:

    How do i move it all over?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Simply copy all the files and directories to the public_html/ folder. As long as you don’t have any customized file directory pointing in your install this should not break anything. The caveat here is that unless the current URL to your site is then you probably have a domain redirect or parked domain pointing your domain name to mywebsite/site which is actually on your cpanel seen as /public_html/site. That needs to be fixed and removed.

    Do you currently have a website or something located at

    If there is nothing there then the process is simple, but if there is already a website there (in the /public_html/ folder) then you need to deal with that one first and get it out of the way.

    If none of this makes any sense to you at all, contact tech support at your host and have them help you with it. It’s the sort of thing that is typically handled at that level.


    I managed to get it working by deleting everything on the public_html (apart from the /site) then copied all the contents of /site into the public_html.

    However before i delete the /site folder i have noticed that all my images are stored in the site/ folder. How do i re-link them to the new versions in public_html.

    One way would be to download all the images to your computer and then use the bulk media uploader to put them into the new website. Trouble there is that you then need to reset them into your existing posts manually. If you have a large site, that would take a while.

    Another option would be to leave them where they are, delete all the other stuff from the /site folder and forget about them. Your new site will continue to use those as the paths are already present in the existing posts. Any new posts should use the new path location for the new website in your public_html/ folder.

    Another option would be to delete all the posts and media from the new site. Then run the Export script on the old site located at Tools -> Export. Then import that file (thus restoring all the posts you just deleted) into the new site, ensuring that you select the option to download and save all the attachments into the new site. Once that is done, go into the posts and check the image paths to ensure they are showing the new one.

    Lastly, there may also be a code-based method such as in htaccess or a php script but that is going to be help beyond what I can offer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Move blog from /site to main directory’ is closed to new replies.