# Error running remap after changing site url

**URL:** https://meta.discourse.org/t/error-running-remap-after-changing-site-url/406649
**Category:** Self-hosting
**Tags:** sql-query, domains, postgres
**Created:** [July 2, 2026, 1:59pm UTC](https://meta.discourse.org/t/error-running-remap-after-changing-site-url/406649 "2026-07-02T13:59:51Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 2, 2026, 4:52pm UTC](https://meta.discourse.org/t/error-running-remap-after-changing-site-url/406649/3 "2026-07-02T16:52:23Z")

</div>

I think Lilly’s idea should work.

What I do is backup the database, change the URL, and then restore and let the Discourse remapper do the job. That code gets used by Discourse hosting and if it fails someone who can fix it will notice. 🙂

But yeah, those referrer links have caused all kinds of issues.

---

_[View the full topic](https://meta.discourse.org/t/error-running-remap-after-changing-site-url/406649)._
