I use wp-cli's search-replace command to do this. I often clone our prod wordpress db to non-prod and wp-cli is how I correct the DB.
You can't run a regular search/replace on the DB because data is stored serialized (another "why?!?!?"); wp-cli's handles this correctly.
-------- Original Message --------
On Jul 13, 2017, 6:05 PM, CJ Fearnley <
cjf@LinuxForce.net> wrote:
There were some frustrating moments in my day today.
They bubbled out in a tweet (am I the only one making strident angry
tweets?): https://twitter.com/cjfsyntropy/status/885592445945352193
To save you the click:
"@WordPress Why, oh why, do u store the hostname with absolute links in
the database? Creativity cannot deal w/ this pernicious bug!! FIX IT!"
I cannot change the hostname or location of a site if that data is hard
coded with absolute links that include the full hostname in the code or
in the database!
Isn't this web development 101 stuff?
I mean it is a basic data normalization issue, no?
Am I wrong here? Is this a quixotic mission fighting windmills?
Where should we file our complaints?
--
CJ Fearnley | LinuxForce Inc.
cjf@LinuxForce.net | IT Projects & Systems Maintenance
http://www.LinuxForce.net | http://blog.remoteresponder.net
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug