WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moving WP to non-root directory (6 posts)

  1. danielb
    Member
    Posted 5 years ago #

    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!

  2. rnawky
    Member
    Posted 5 years ago #

    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.

  3. figaro
    Member
    Posted 5 years ago #

    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.

  4. danielb
    Member
    Posted 5 years ago #

    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?

  5. figaro
    Member
    Posted 5 years ago #

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

  6. danielb
    Member
    Posted 5 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic