Updating Internal Links After Modifying Permalink Structure

  • Unknown's avatar

    Hello. Good morning. I hope you are doing well.

    Today I changed my site URL permalink structure from “day and name” to “post name.”

    E.g. blog.com/07/04/2022/article-title-name

    TO

    blog.com/article-title-name

    I set up a redirect to send all old URLs with the date to the new URL without the date using the Redirection Plugin.

    My question is am I able to change all internal links from the old URL directly to the new URL? Right now, I have a bunch of internal links in blog articles to my own content that include the date, per the old URL. They are redirecting fine, but I would rather link directly to the new URL instead of always relying on the Redirection Plugin for internal content (redirect creates an extra http request and slightly increases pageload). Changing it manually would take forever and is a non-starter.

    Is there a way to do this so I am not always dependent on the Redirection plugin?

    Thank you

  • Unknown's avatar

    FYI, this was the redirect I setup that got rid of the dates:

    Source: /(d*)/(d*)/(d*)/([A-Za-z0-9-*])
    Target: /$4

    I don’t know if that would be useful for changing internal URLs

  • Hi there!

    There are no internal tools to automatically replace all those links, I’m afraid. You could use a plugin like Better Search and Replace, but since you’re probably wanting to change various unique URLs, it wouldn’t save you much time either.

    If you’d like to try, here’s the plugin I mentioned: https://wordpress.org/plugins/better-search-replace/.

    Also, remember that with your plan, you can reach our support team directly via https://wordpress.com/help/contact. And if you’re looking for plugin recommendations, you can try asking at the community forums: https://wordpress.org/support/forums/.

    Most folks in these forums have a free WordPress site hosted here with us, and thus can’t install plugins without upgrading. And since the upgraded sites come with direct support, those users don’t typically hang out here. So if you’re looking for plugin recommendations, you’ll likely find more relevant information if you’ll try the other forum.

  • The topic ‘Updating Internal Links After Modifying Permalink Structure’ is closed to new replies.