• I am trying to create a sub directory file that is the same as my root directory, but under the name of a location, in order to optimise its spot in google’s organic search results. I have copied all the files from the root directory into the sub directory named ‘locations’, however whenever I go to the website /locations it comes up ‘page not found’. How can i remedy this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    After you had moved all files to sub-directory had you

    1) Changed the URL in database.
    2) Regenerate the Permalinks so that the htaccess will be updated.

    See steps given in the below link.

    https://codex.wordpress.org/Moving_WordPress
    https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Thanks

    Thread Starter bertieee

    (@bertieee)

    Do you mean that I have to change the URL of the sub directory in the database?
    I guess that in the moving_wordpress guide that the guide most applicable would be ‘moving wordpress on your existing server’ but the following steps do not seem right:

    “In the box for WordPress Address (URL): change the address to the new location of your main WordPress core files.

    In the box for Site Address (URL): change the address to the new location, which should match the WordPress (your public site) address.”

    I am not changing the location of my main wordpress core files, I am copying them so that they are in two locations. So back to my first point, should I be attempting to change the URL of the subdirectory in the database? I am not wanting to change the root directory URL at all. I am happy with http://www.mysite.co.nz , I just want http://www.mysite.co.nz/locations to mirror it. When someone clicks on a link in my site they currently go to http://www.mysite.co.nz/link and I want to optimise it so they can do both this, as well as, http://www.mysite.co.nz/locations/link.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Copy root directory files into sub directory’ is closed to new replies.