Support » Fixing WordPress » Home page always redirects to subfolder

  • dave517



    I messed up something with WordPress. When I want to access it redirects to my previous subfolder

    In WP in settings I change URL to, also in options I change the 2 values which have addresses if they have

    But my home page still redirects to When I click on for example Contact us, I get to, so that’s working fine.

    On the FTP I have the page in the root and also in root/test. But I’m afraid to delete root/test (the subfolder), because Im afraid I will not be able to access my site completely.

    Any idea how could I fix this issue?


    • This topic was modified 3 years ago by dave517.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p


    – Using FTP/ SFTP , or your web-host’s cPanel or whatever file management application your host provides, access phpMyAdmin on your host, then find your DB, there check the wp_options Table (Note: The table prefix of wp_ may be different if you changed it when installing), and make sure siteurl field and home field are correct. See
    If you haven’t already done, always backup your database before doing any actions, just in case something really goes wrong. You can never have enough backups!



    So Dave was your WordPress installed in\test and now you want to access it from instead?

    By Changing it in WordPress is not going to work as you need to copy index.php and .htaccess from the test directory and paste it into the root. Then you need to edit the index.php file so that it points to the test folder.

    See this on the Codex:

    I use method 2.

    Thread Starter dave517



    Thanks for your replies.

    So first I installed my WP in the root directory, but then I wanted to move it to root/test, because I wanted people who access the site to be redirected to a FB page. And I wanted to able to keep developing the site on the address

    So I copied everything from root to the subfolder, with changing information in WP settings and also htaccess. But I found out, that it’s not really possible to redirect people from to FB page and have a functioning site on (or at least I wasn’t able to do it). So I wanted to reverse everything.

    I copied the content from the subfolder to the root, tried to set back everything (WP settings, htaccess) and I also added a rule to htaccess which redirects all the IPs to the FB page, except mine. But still after that, the homepage wasn’t really showing.

    Then I tried it on my different notebook. Lo and behold, it was working there. Thanks to that I figured out, that probably I needed to clear my cache. After doing that it is now working just fine.

    After all it seems like I did everything right regarding the migration of the site (thanks Google!), but clearing the cache on my notebook was the culprit.

    Anyway, thanks for your help, guys!

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Home page always redirects to subfolder’ is closed to new replies.