• Hello, my internal links from a migration appears to have issue:

    In my permalink setting I set to use the Post Name.

    So all my internal links during the import of posts point to the “Post name” as URL, but my post URL is something else when I created the post. For example:

    Title: Best Sample Post

    URL: myblog.com/sample-post (I customized it to exclude the word best for the purpose of this example)

    Internal Link from another blog post: myblog.com/best-sample-post

    How do I fix this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can define the link structure for all pages and posts under Settings > Permalinks. This must also apply to imported data. Simply save again.

    If that doesn’t work, check if you have any caching plugin. If so, also empty its cache.

    If it still doesn’t work, it would be good to know what kind of migration it was? What did you import and how?

    Thread Starter wpbie

    (@wpbie)

    it’s the blogger migration using the wiordpress blogger import xml file. I already fixed the perms link format of blogger that includes year and month and redirect to the WordPress post appropriately. But only some posts have interlinks wrong so strange. To your suggestion, I clear the cache and do the permalink after import . Still the same issue. What else should I do to ensure the interlink is correct?

    • This reply was modified 1 year, 1 month ago by wpbie.
    Thread Starter wpbie

    (@wpbie)

    Another thing I could think of is maybe the theme? It may have hard code to get “post title” as that’s what the permainks setting is?

    It would be extremely unusual for a theme to dictate the permalink structure.

    Your problem does not seem to be the structure of the permalinks of the posts themselves. Rather, it is the links between them. I.e. Posting 1 contains a link to Posting 2 in the text. And of course, these are not adjusted either by the import or by the permalink settings.

    Nevertheless, I see various possibilities for this:
    a) You could edit all posts by hand and set the links correctly. Yes, I know: enormous effort.
    b) You could use the plugin Better Search and Replace to search and replace in the posts. In other words, replace old URLs with new URLs in the texts. This could also be time-consuming if you have a lot of different links.
    c) Since WordPress does not know the old link structure, it cannot know how to process calls from it. With the plugin Redirection you could make sure that a call to the old URL redirects to the new URL. The plugin also records unknown URLs, so that you could solve this step by step even with a large number of URLs. This would be my recommendation.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘internal links point to post name issues’ is closed to new replies.