Giving wordpress its own directory (9 posts)

  1. Tim Squires
    Posted 3 years ago #

    Hello, I have a problem with a 404 on this url:


    The wordpress install is in a subdirectory called "motocross"

    During development I set up a cpanel redirect to the "motocross" directory, but then I removed the redirect and followed the instructions on "Giving wordpress its own directory" (I used the "pre-existing subdirectory" install instructions)

    Now, when I go to the URL, the home page displays correctly, but if I navigate to the other pages and then try to go BACK to the home page, I get a 404 error.

    Also, I have noticed that when I try to go back to the home page, the old old url is displayed in the address bar - it says "http://7five7.com.au/motocross" instead of just "http://7five7.com.au"

    As the site needs to be up and running I'm on the verge of ditching everything and doing a complete reinstall of the site directly into the domain root, but would appreciate any help that would help me to avoid doing this :)

  2. Miroslav Glavic
    Posted 3 years ago #

    I went to the site, clicked on links.

    When I clicked the 7FIVE7 banner, the link goes to http://www.7five7.com.au/

    The HOME link (under 757 logo) points to http://7five7.com.au/motocross/

    Go to your admin dashboard and

    Settings > General

    Make sure

    WordPress Address (URL)
    Site Address (URL)

    Make sure the settings on those, say http://7five7.com.au/ instead of http://7five7.com.au/motocross/


    Refresh your homepage.


  3. Tim Squires
    Posted 3 years ago #

    The instructions said to only change the site address, but I followed your advice, and also changed the wordpress address. I got another error, and now all the CSS from the site is missing, and I can't log into the admin panel... going from bad to worse I'm afraid

  4. Miroslav Glavic
    Posted 3 years ago #

    Did you install wordpress on the root directory?

    Like which directory did you put the actual files?

  5. Tim Squires
    Posted 3 years ago #

    The files are in the "motocross" subdirectory

  6. Hi Tim,

    You'll want to go and change the WordPress Address (URL) to http://7five7.com.au/motocross

    and the site url to

    To do this you will need to access your database via phpMyAdmin, change the wordpress url to what it was in the wp_options table.

    Then, you'll want to take the index.php from your motorcross directory, update it to say:


    on line 7 and then your site should be like it should.

    I do this all the time when I work on sites and wrote a post detailing my steps -

    Good luck

  7. Tim Squires
    Posted 3 years ago #

    Thanks Christine,

    Many thanks, that sounds great, but if it's OK I have two questions:

    1. In php/myadmin, I am confused by the difference between option-name and option-value. I can change the option_name to http://7five7.com.au/motocross, but I can't figure out how to change the option_value (does this need to change as well as the option_name?)

    2. When I modify line 7 in index.php - should that file remain in the motocross directory, or do I need to copy it into the domain root and make the modification there?

    Thank you for your help!

  8. Q1 - not sure if it's option_name.. but whatever is http://7five7.com.au should be

    Q2 - the new updated index.php goes in your root. directory.

  9. Tim Squires
    Posted 3 years ago #

    Thanks Christine - I do appreciate your help very much. I have decided that it may be easier to use BackupBuddy and do a fresh installation and start over. Many thanks for your input and advice.

Topic Closed

This topic has been closed to new replies.

About this Topic