When creating a staging site, the rewriting of urls does not seem to be taking into account serialized data in WordPress. The serialized data is corrupted when the domain length changes, but is not updating the variable in the serialized string.
when changed to
would corrupt the serialized string because the length is not being updated as well.
In my case, I am using Advanced Custom Fields (which is widely used in the WordPress community), and the link field data is being wiped anytime the urls are replaced, as is the case with staging sites, cloned sites, or updating the domain etc.
I love the staging feature, as it allows me to easily spin up a site to make changes and show my clients before going live… but the missing data causes a bunch of problems that only confuses my clients and causes usability issues as they’re testing out new features. Any help with this is appreciated!