|wordpress meta query serialized data||0.71||0.5||6347||81|
If you use the like comparison operator in your meta query, it should work fine to look inside a serialized array. Show activity on this post. Show activity on this post. I got curious about the answers above, where the meta_query targeted the key latitude instead of _coordinates.Why are post meta queries so expensive to do?
Aside from the costs of partial string searches, post meta queries are slow, and serialised data can change depending on things such as the length of contents, making searching incredibly expensive, if not impossible depending on the value you're searching for What About LIKE?What happens when an object is de-serialized in WordPress?
This is because when the object is de-serialized, an object is created, and all its wake up methods and constructors get executed. This might not seem like a big deal until a user manages to sneak a carefully crafted input, leading to remote code execution when the data is read from the database and de-serialized by WordPress.Is it safe to store serialized PHP objects in WordPress?
Storing serialized PHP objects via the serialize function can be dangerous, which is unfortunate as passing an object to WordPress will mean it gets serialised. This is because when the object is de-serialized, an object is created, and all its wake up methods and constructors get executed.