Opened 3 years ago
Last modified 11 months ago
#54212 new feature request
Add hooks to get/update/add_option functions
Reported by: | nik7n | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.8.1 |
Component: | Options, Meta APIs | Keywords: | |
Focuses: | Cc: |
Description
It would be great if there were hooks in option saving/updating functions so that it would be possible to override usage of serialize
in favour of json_encode
when storing option value in DB. serialize
gives a lot of problems with site URL when moving from one domain to another.
I spent about two days already trying to replace site URL after moving the website from local to prod environment. The problem is that my prod website's domain name has couple more characters than my local domain, thus when replaced, the PHP-serialized values in DB become invalid so it breaks the entire website for me. I tried many different tools already, as well as the official wp search-replace
CLI tool, but it also breaks the website completely, I start getting a lot of SQL-related errors.
Please add away to replace that ugly serialize with json!