# Effect of changing the WordPress site URL

**URL:** https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275
**Category:** WordPress
**Created:** [18 september 2017 om 14:05 UTC](https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275 "2017-09-18T14:05:20Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [22 september 2017 om 06:44 UTC](https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275/21 "2017-09-22T06:44:49Z")

</div>

Sure @jomaxro can assist.

---

<div class="post-metadata">

### Author: ![jenkma02](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jenkma02/32/120687_2.png) [@jenkma02](https://meta.discourse.org/u/jenkma02)
#### Post date: [22 september 2017 om 15:31 UTC](https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275/22 "2017-09-22T15:31:34Z")

</div>

They got back to me and it’s actually still the wrong url (without the www). fwiw, the comments are coming through to the wordpress site just fine, it’s literally just the Show Full Post button that’s broken.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [22 september 2017 om 17:30 UTC](https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275/23 "2017-09-22T17:30:30Z")

</div>

We’ve been in communication, Gerhard assisted with the command.

---

<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: [22 september 2017 om 18:13 UTC](https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275/24 "2017-09-22T18:13:05Z")

</div>

Thanks! The TopicEmbed embed\_urls can’t be updated from the WordPress end, so if they need to be changed, you guys will have to do it. Ideally, Discourse would just follow the redirects to fetch the WordPress post’s content. It might be worth checking that the redirects are working.

If the URLs need to be rewritten, something like this can do it:

```plaintext
TopicEmbed.all.each do |embed|
  if embed.embed_url.starts_with? 'http://olddomain.com'
    embed.embed_url = embed.embed_url.sub 'http://olddomain.com', 'http://newdomain.com'
    embed.save
  end
end

```

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [23 september 2017 om 00:28 UTC](https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275/25 "2017-09-23T00:28:05Z")

</div>

@gerhard has run the remap. @jenkma02 can you confirm if things are working for you now?

[Previous page](https://meta.discourse.org/t/effect-of-changing-the-wordpress-site-url/70275.md?page=1)
