# 도메인 변경 후 이미지 URL 업데이트

**URL:** https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215
**Category:** Support
**Created:** [2월 3, 2021, 4:30오전 UTC](https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215 "2021-02-03T04:30:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [2월 3, 2021, 4:30오전 UTC](https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215/1 "2021-02-03T04:30:59Z")

</div>

기존 게시물의 이미지 URL을 어떻게 업데이트할 수 있을까요? 사이트 전체의 도메인 이름을 변경했는데, 이제 이미지들이 더 이상 존재하지 않는 이전 사이트로 가리키고 있습니다.

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [2월 3, 2021, 5:02오전 UTC](https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215/2 "2021-02-03T05:02:06Z")

</div>

이렇게 하면 됩니다:

> [@Replace a string in all posts](https://meta.discourse.org/t/replace-a-string-in-all-posts/48729?u=omarfilip):
>
> bookmark This guide explains how to replace a string in all posts within a Discourse instance. person_raising_hand Required user level: System Administrator warning Console Access Required Want to replace a string in all the posts on a site? Let’s get started! warning WARNING: We strongly recommend you take a full backup before proceeding, and make sure your string replacement is specific enough to affect only the places you want it to. If this string replacement goes wrong, every…

---

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [2월 3, 2021, 6:50오전 UTC](https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215/3 "2021-02-03T06:50:25Z")

</div>

잘 작동했습니다. 다만 - 정보를 거의 제공하지 않는 오류 3가지를 받았어요:

> Failed to remap post (topic\_id: , post\_id: 111)
> 
> Failed to remap post (topic\_id: , post\_id: 189)
> 
> Failed to remap post (topic\_id: , post\_id: 216)

왜 실패한 걸까요?

그리고 ID를 알 수 없는(어떻게 확인하는지도 궁금한데) 일부 게시글은 업데이트되지 않았습니다.

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [2월 3, 2021, 4:54오후 UTC](https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215/4 "2021-02-03T16:54:50Z")

</div>

해당 게시물을 수동으로 확인하여 무엇이 다른지 살펴보세요. URL은 `/p/111`과 같은 형식입니다.

---

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [2월 3, 2021, 10:28오후 UTC](https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215/5 "2021-02-03T22:28:04Z")

</div>

알아두면 매우 유용한 정보입니다. 하지만 해당 포스트 ID를 이 방식으로 접근하면 각각 404 오류가 발생합니다. 그 원인이 무엇인지 파악할 수 있으면 좋겠습니다.

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [2월 3, 2021, 11:04오후 UTC](https://meta.discourse.org/t/updating-image-urls-after-a-domain-change/178215/6 "2021-02-03T23:04:16Z")

</div>

이것들은 이전에 삭제된 게시물일 가능성이 가장 높습니다.
