• theking2

    (@theking2)


    After creating an extensive site on a development server we have trouble moving it to production. All links to media files by using the File block in Gutenberg erroneously point to the development server with an absolute link (sounds like a bug to me). Yes permalinks is on.
    How do we correct all thee 500+ links?

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

Viewing 1 replies (of 1 total)
  • Joy

    (@joyously)

    Media files have to use absolute URLs since they are on pages that have dynamic addresses (the page address is not a file that exists). WP can be in a folder or be a multisite, so it can’t simply use /.

    It is always the case that moving a site involves changing the domain name. Most migration plugins will do this for you.

    The WordPress export plugin used to resolve these for you, but treats blocks differently than legacy content (before blocks). I have seen it leave the data attributes untouched, which means that the domain name is not changed.

    A good tool to have around is the Search Regex plugin, to change paths in content easily.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding file block creates absolute paths’ is closed to new replies.