Grow your CSS skills. Land your dream job.

Anyone moved a WordPress install from the root to a new directory?

  • # February 28, 2013 at 12:09 pm

    Hi,

    I am trying to find information on moving my wordpress blog from my root, to a new folder in my root called blog.

    So right now I have example.com and this is showing my blog

    But I would like to create a folder and have example.com/blog show my blog

    My root would then be empty apart from the blog folder.

    Any ideas? A lot of the articles I have read have been for moving from the folder to the root?

    Thanks in advance

    G

    # February 28, 2013 at 12:55 pm

    Should be straight forward, there’s a few database changes to make and remember to 301 redirect any old urls and backup everything before trying.

    http://codex.wordpress.org/Moving_WordPress

    # February 28, 2013 at 1:05 pm

    From previous expierence, you should just be able to move the files with no problems and still have it work. The only potential roadblock I can think of is that there maybe some absolute paths for keys like `home` who’s values don’t update automaticly (in the `wp_options` table) so you might need to update their values manually so you may need to jump in make sure they’re pointing to the right locations. This change may also need to be made for any assets you link up on the site that also use absolute paths.

    Be aware also that you will need to move the `.htaccess` file from the old root to the sub directory (otherwise your URL re-writting among other things will break). If you are using a GUI to move files, this is often not shown by default. Therefore, you will need to enable showing hidden files to verify that it gets moved as well.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".