Change old URLs after the domain change

Question

I have setup wordpress on my server, and after some time I’ve changed the domain name of the installation. However, all of the old urls within the site point to the old domain. How can I change old urls to match the new domain without breaking the database?

Here’s what I did:
I went to settings -> general
I’ve changed the site url and wordpress address (url).

The directory in which the wordpress installation is residing stayed the same.

How do I change all the old link? I was recommended using the UpdraftPlus migration feature, but I don’t see how would this affect the old links. I’d use wp search-replace i.e. wp cli, but I’m not sure if that tool will change all GUIDs (I’ve read that GUID should not be changed, but I’m not sure if I need to).

For future visitors: I’ve resolved the issue using wp-cli:

wp search-replace 'example.net' 'example.com' --skip-columns=guid

Use --dry-run for the sake of your sanity.

0
Gitnik 8 months 2020-11-25T08:10:33-05:00 0 Answers 8 views 0

Leave an answer

Browse
Browse