Support » Fixing WordPress » Permalink structure not being followed, results in 404s

  • I recently started the blog section on my site and I’m wanting to have all posts have the permalink structure “/blog/%postname%/”

    That’s what I have set in my permalink settings, along with the category base “blog”:

    https://i.gyazo.com/9635d63fd9111e3eb3bc0740c3ceefbc.png

    However, neither of those are working properly.

    When I try to go to a blog post, which should be /blog/investing-to-get-out-of-debt/, it redirects to /investing-to-get-out-of-debt/ but it’s a “Page Not Found” error there. The /blog/ base is shown in the post page: https://i.gyazo.com/42f71819ab6d7ccafae6b995a6e23595.png but the URL doesn’t work.

    Additionally, the “blog” category base isn’t working. For example it should be /blog/personal-finance/ but that just redirects to /personal-finance/ (which at least does work).

    Thank you for any help!
    Chris

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @csburdick,

    In my best knowledge, what you are doing here is confusing the system while querying for your permalink.

    I think you should either remove the category base as ‘blog’ or remove ‘/blog’ in permalink structure and then check if it is working.

    Thank you, that works for the post now, but now the categories link to /blog/personal-finance/ and it gives an error.

    This works: /blog/personal-finance/ – but I don’t know how to get WP to automatically link to that.

    Thumb Rule – You cannot use same phrase/word/character to appear in both ‘category base’ and towards the ‘beginning’ of the posts URL.

    Thank you, I understand. However if you look at this blog post: /blog/investing-to-get-out-of-debt/

    And look at the “Personal Finance” category link, it links to /blog/personal-finance/ – which is broken. The correct link is /personal-finance/ but how do I get WP to automatically link there?

    Thank you,
    Chris

    Did you remove blog as the category base in the permalink settings?

    Additionally, to test you can create a TEST category from Dashboard > Posts > Category > and add the new TEST category. Then when its created, click on the VIEW option and check what URL is created?

    Yes, I removed “blog” from category base. Here are my current settings: https://gyazo.com/52f4bd6c27509618c46f59231e5df169

    I created a test category as suggested and the URL it creates is https://www.bestroboadvisors.org/blog/test/ – which leads to a “Page not Found” error.

    Thank you,
    Chris

    Okay, can you try removing /blog from Custom Permalink too and then test how the post-link and the taxonomy-links behave?

    PS: At this point, I’d first take a full backup.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Permalink structure not being followed, results in 404s’ is closed to new replies.