• Hello, I have a question about mass importing some posts with WP XML importer that contains some internal links.

    Let’s get the scenario: I’m trying to import 50 posts (each contains 3 internal links to existing pages A,B and C) plus one page that contains all links to the permalinks of that 50 posts (kind of a “sitemap”).

    These posts have been generated with an external tool (so not a previous wp installation), and the links are written with the classic “< a >” tag with a full URL to the page.

    Everything works fine, I can import the posts, links are working both in the posts and the sitemap.

    Now the question. Let’s suppose I change the permalinks of pages A B and C : the links in the 50 posts are not updating, still pointing at the old URLs.
    Same thing happens if I change permalink of one of the 50 posts, the URL into the “sitemap” is not updating.

    I suppose that this happens because WP importer loads the pages but does not store any new record in the links DB table.

    Is there any way to achieve this result and let that links update automatically like any other link written with the wp editor?

    Thank you very much,
    Best regards

    • This topic was modified 4 years, 7 months ago by fabiomasarin.
    • This topic was modified 4 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • I suppose that this happens because WP importer loads the pages but does not store any new record in the links DB table.

    Is there any way to achieve this result and let that links update automatically like any other link written with the wp editor?

    The import is a one-time event. The links are changed as they are imported, but once the import is finished, the links are the same as any other link you put into a post: static. You could change permalinks of anything and that change would not be reflected in the internal links of posts, regardless of whether they were imported. But the key thing is Don’t change permalinks! If you do, they aren’t permanent.
    You might want to use a plugin like Search Regex to fix links across posts. Or use Broken Link Checker plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Question about WordPress xml importer with internal links’ is closed to new replies.