Support » Fixing WordPress » How to change installation directory

  • Andy


    I’m about to remove the domain that my main hosting account is with. The web site in question is an add-on so it’s in a sub-directory and will need to be moved up to the top level when the main domain expires.

    Just wondering what steps need to be taken? Is it just a case of cutting and pasting all the files? any other settings that need to be changed?


Viewing 4 replies - 1 through 4 (of 4 total)
  • C W (VYSO)


    Slightly confused by your first paragraph but I am proceeding on the assumption that your query is:

    (1) You have a WordPress installation in a subdirectory: e.g. at

    (2) You would now like the WordPress installation to run out of the root: i.e. somebody goes to and they see your site.

    If this is what you mean, then these are the instructions you can follow (under “Using a pre-existing subdirectory install”). Essentially, there is no need to physically move the entire WordPress installation into the root.

    On a side note, assuming you are using WordPress 3.4 as indicated, you should upgrade your installation. Using manifestly out-of-date versions increases the risk of security vulnerabilities and misfiring functions, and also prevents you from accessing the improvements in upgrades.



    Right, I’ll check those instructions out. Thanks for the link.

    Regarding not needing to move it, I guess the issue is this:

    I have a main domain, let’s say and is in a sub-folder. I want to expire and so I don’t think I can just get away with NOT moving into the root. Does that make sense? Because something needs to go in place of ‘one’ or ‘two’ will be a sub-directory or sub-domain of nothing.

    C W (VYSO)


    The subdirectory containing your WordPress installation is currently and will continue to be the subdirectory of the top-level directory – it won’t become a subdirectory of nothing. Domain names are merely strings that point the way to where the relevant files/folders are; they aren’t actual physical locations per se.

    However, I think I’m now somewhat clearer about what you want to do. As I understand it, your setup is this: is currently your primary domain. You have as an add-on domain, which points to a subdirectory containing a WordPress installation. You now wish to make the primary domain.

    If that’s the case, then you can do one of two things:

    (1) Follow the instructions at the tutorial that I linked to above, and then you would change the primary domain in your hosting control panel to

    (2) Alternatively, you could actually just physically move all the files and folders into the top-level directory and then change the primary domain in your hosting control panel to Since the database and URL of your WordPress installation will remain the same, there shouldn’t be a need to do anything else.

    Which path you take depends on your needs and preferences. For instance, if is the only domain for this hosting account (i.e. you have no other add-on domains), then you may prefer (2). If on the other hand you have multiple domains pointing to this hosting account, then you may prefer to keep your top-level directory clear by using (1).



    Thanks! I’ll dig through all this info and also contact my host and see how I get on.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change installation directory’ is closed to new replies.