Title: Adding file block creates absolute paths
Last modified: October 31, 2020

---

# Adding file block creates absolute paths

 *  [theking2](https://wordpress.org/support/users/theking2/)
 * (@theking2)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/adding-file-block-creates-absolute-paths/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-file-block-creates-absolute-paths%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/adding-file-block-creates-absolute-paths/#post-13622898)
 * 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](https://wordpress.org/plugins/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.

## Tags

 * [media](https://wordpress.org/support/topic-tag/media/)
 * [moving](https://wordpress.org/support/topic-tag/moving/)
 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)
 * [production](https://wordpress.org/support/topic-tag/production/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Joy](https://wordpress.org/support/users/joyously/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/adding-file-block-creates-absolute-paths/#post-13622898)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
