# Hosted to self-hosted migration: past uploads still reference discourse infra

**URL:** https://meta.discourse.org/t/hosted-to-self-hosted-migration-past-uploads-still-reference-discourse-infra/281131
**Category:** Support
**Created:** [October 5, 2023, 9:56am UTC](https://meta.discourse.org/t/hosted-to-self-hosted-migration-past-uploads-still-reference-discourse-infra/281131 "2023-10-05T09:56:45Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![kluvin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kluvin/32/289447_2.png) [@kluvin](https://meta.discourse.org/u/kluvin)
#### Post date: [October 5, 2023, 10:24am UTC](https://meta.discourse.org/t/hosted-to-self-hosted-migration-past-uploads-still-reference-discourse-infra/281131/5 "2023-10-05T10:24:52Z")

</div>

Thank you Richard!

To clarify, by: [Replace a string in all posts](https://meta.discourse.org/t/replace-a-string-in-all-posts/48729)

Using

```plaintext
rake posts:remap["find","replace","string",true]

```

do

```ruby
rake posts:remap[
  "https://cdck-file-uploads-europe1.s3.dualstack.eu-west-1.amazonaws.com/standard21/uploads/everviz/",
  "/uploads/default/"
]

```

The alternative replacer to relative would be `“[https://forum.everviz.com/uploads/default/](https://forum.everviz.com/uploads/default/)”

Is the relative link what you’re thinking of?

e: correction of relative url with /

Oneliner:

```ruby
rake posts:remap["https://cdck-file-uploads-europe1.s3.dualstack.eu-west-1.amazonaws.com/standard21/uploads/everviz/", "/uploads/default/"]

```

---

_[View the full topic](https://meta.discourse.org/t/hosted-to-self-hosted-migration-past-uploads-still-reference-discourse-infra/281131)._
