# Change WP Discourse domain name

**URL:** <https://meta.discourse.org/t/change-wp-discourse-domain-name/285987>\
**Category:** Support\
**Tags:** wordpress, discourseconnect\
**Created:** [November 19, 2023, 12:31pm UTC](https://meta.discourse.org/t/change-wp-discourse-domain-name/285987 "2023-11-19T12:31:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [November 19, 2023, 9:12pm UTC](https://meta.discourse.org/t/change-wp-discourse-domain-name/285987/2 "2023-11-19T21:12:51Z")

</div>

> [@haydenjames](#):
>
> the existing/old post are still showing the forum post address using the old domain.

> [@haydenjames](#):
>
> If I click “Update Discourse topic” and resave the post, then the URL is updated correctly for the existing post. However, I would like not to have to manually re-save 100+ posts. Hopefully, there’s an easier way?

You can automate this process. I think the links that are pointing to the old Discourse domain that you are referring to are the links to Discourse topics that appear underneath WordPress posts. These links are set by the post’s `discourse_permalink` post\_meta field. You could try manually updating that field for one of your posts to confirm that solves the issue:

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/9/0/d90970d2b68bf2f501e0e8a62135b437ae31ae0a.png)

There are a few WordPress plugins that can automate the process of remapping this field. In the past, I’ve used the Velvet Blues Update URLs plugin. It seems that plugin is no longer supported. There is a forked version of it that I haven’t tried: [Search & Replace Everything – Quick and Easy Way to Find and Replace Text, Links – WordPress plugin | WordPress.org](https://wordpress.org/plugins/update-urls/). I’ve also seen this plugin recommended: [Better Search Replace – WordPress plugin | WordPress.org English (Canada)](https://en-ca.wordpress.org/plugins/better-search-replace/).

The main thing to be aware of is that you need to use a remapping plugin that is able to update post custom fields. I think both of the plugins I linked to can do that. I’d also look for a plugin that lets you perform a dry run before performing the actual remapping. The second plugin that I linked to says it supports that.

Be sure to save a fresh backup of your WordPress database before running the remap. It would also be good to try manually updating the `discourse_permalink` field for just one post to confirm that solves the issue for you.

---

_[View the full topic](https://meta.discourse.org/t/change-wp-discourse-domain-name/285987)._
