Support » Fixing WordPress » 404 Not Found error after moving from sub to root

  • Okay before you guys send me the whole WordPress codex let me explain my problem:

    So, after completing my website I moved all my files from my subdirectory “temp” to the root. I followed the WordPress documentation exactly, should be easy as cake, but as soon as I moved everything, everything got messed up (of course). I managed to fix some stuff but the problem I still have now is that the whole homepage ( is working but a soon as you try to go to a portfolio item or to an other page it gives the 404 Not Found error.

    So of course somewhere there is still a path leading to the wrong urls of the posts but I can’t find where it is. This is what I tried to resolve it:
    – I checked config.php from WordPress, checked almost every file from my theme looking for wrong links/paths.
    – Troubleshooting permalink settings, also with the update url tool WordPress suggested
    – Adjusted all the links, manually, in my database that still lead to the “temp” directory
    – Adjusted everything to the current path
    – Changed WordPress htaccess, also made it rewritable (777)
    – Tried refreshing my history and cache

    And I tried a lot more things that I probably forgot about now. I checked all the documentation and maybe I’m overlooking something but I just don’t know. Anyway, I give up. I really hope someone can help me because now I basically have an online/live broken website. Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    Go to Dashboard — Settings — Permalinks. Then click Save button


    Thanks for your answer. If you’d read my post a little more carefully you can see I already tried everything involving the permalinks. So no that doesn’t work, I wish it did. I also tried creating a new post but it doesn’t show up in my database so I guess there is indeed something wrong with a file like config.php If I look at it, it doesn’t look like the sample config so maybe I should just try deinstalling and reinstalling WordPress maybe? I installed WordPress via my host’s so called “Installatron” so maybe something went wrong with that. I adjusted all the links in that as well tho.

    Okay so I read somewhere to delete the .htaccess file and set the permalink settings to default. This did the trick, I can view my posts now, only the permalinks look super ugly now (like this: instead of The customised permalink setting was %category%/%postname%/). But any other permalink option doesn’t work, only the default leads to the portfolio posts and pages. Does anyone know how I can fix this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404 Not Found error after moving from sub to root’ is closed to new replies.