Serialisation: definition
Serialisation is the process that turns a complex data structure (array, object) into a storable text string, with the ability to reconstruct it identically afterwards.
A technical mechanism that can trip up a simple URL change
In PHP, the serialize() and unserialize() functions store an array or object in a text column and retrieve it intact later. WordPress relies heavily on this mechanism: many settings, particularly in the wp_options and wp_postmeta tables, are stored in serialised form, in a format that includes the exact length of each string.
This detail is what makes a “blind” URL replacement risky when running a direct SQL query during a domain change or a switch to HTTPS: if the old URL is 20 characters long and the new one is 23, replacing the text without recalculating the declared length breaks the serialised structure, and the data becomes unreadable to WordPress. This is precisely why WP-CLI’s search-replace command exists: it correctly rebuilds serialised data instead of doing a simple text replacement.
Frequently asked questions
Does PrestaShop also use serialisation?
How can you tell if serialised data has been corrupted?
Is there a reliable tool for changing a URL in WordPress?
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.