Dumb WordPress migration question

Hi all,

Once again, I am stuck on something that feels like it should be trivial, but isn’t…

I am migrating a WordPress site to a new server, IP, and domain name. In the mysql backup from the original, I noticed a lot of IP addresses show up in the database for posts and static resources like uploads. I’m sure there’s something I’m missing, but I would like all those references to point at my shiny new domain name, rather than pointing at a soon-to-be-dead IP address on a different cloud service.

Has anyone ever done an export/import like this before, and come across this issue? More to the point, do you know how to fix it?


I’ve done a few moves over the years, but usually using the same name. I use a tool called Duplicator Pro. I did a write up here; https://talesfromthedatacenter.com/2019/12/an-easier-way-to-move-a-wordpress-site/

I have used it to change the site name too.

I figured it out, but not super satisfactorily. I had to update the siteurl and home options in the wp_settings table of the database - these are used to write links and redirects. I don’t know how you would do that as part of an automated migration without some kind of custom script.

That’s why I use the Duplicator tool :slight_smile:


1 Like

The great thing about this is that every day brings a new issue to bang my head off a wall about.

Today, I spent two hours trying to add https support to my proxy. The first hour I was trying to figure out why remote traffic wasn’t working - a reboot fixed it (I think I had an orphaned container blocking a port from a bad config). The second hour, after getting an SSL cert issued, was trying to figure out why my proxy config wasn’t working. The nginx config looked perfect. Eventually…duh - I changed docker-compose.yml and passed port 443 through from the host to the proxy container, and the world was right again.

Oh - and apparently you can set the site URL and home parameters in wp-config.php.


1 Like