[wp-trac] [WordPress Trac] #54212: Add hooks to get/update/add_option functions
WordPress Trac
noreply at wordpress.org
Sun Oct 3 04:47:44 UTC 2021
#54212: Add hooks to get/update/add_option functions
-----------------------------+-----------------------------
Reporter: nik7n | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.8.1
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
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!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54212>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list