WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Moving WP to non-root directory

[Resolved] Moving WP to non-root directory

  • I’ve installed WordPress in the site root and then decided to move it into a dedicated directory. I’ve transferred it according to the manual in Codex and everything works fine. But after the transfer I have two copies of index.php and .htaccess:

    /index.php
    /.htaccess
    /wordpress/index.php
    /wordpress/.htaccess

    Do I have to keep all those files?

    Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you copied the files from /wordpress to the root, then you can delete the ones in /wordpress (you were supposed to move them, not copy)

    Make sure you change the location of your wordpress installation under your settings first.

    You don’t need to keep the root index.php. You do need to keep the /wordpress/index.php

    Whether or not you need to keep either of the .htaccess files depends on if and/or what you may be using them for…open them and see what’s in them…that should tell you if you need to keep them.

    rnawky, yes I’ve copied the files from / to /wordpress. I would think I had to move them like you said, but here’s a quote from the Codex (see link in the first post):

    Copy the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address).

    figaro, these .htaccess files are identical, all they contain is WP rewrite rules. So I can delete both files from the “old” location?

    Yes, delete both from the old location and keep both in the new location.

    Guys, I’m sorry, but I’ve forgot to mention that I want my blog to be still accessible from the site root. As I’ve already found out by practice, the right solution is to store index.php and .htaccess generated by WP in the “blog root” folder. In my case this is the same as the site root.

    Thanks for you help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Moving WP to non-root directory’ is closed to new replies.
Skip to toolbar