Knowledgebase

Understanding Serialised Data Print

  • databasesphpmyadmin, databases, plugins, wordpress, domain, backup, restore, themes, woocommerce, errors
  • 0

Why some values must not be edited by hand.

WHAT IT IS

A way of storing a structure, such as a list or a set of settings, as a single piece of text.

The format records the type and the length of each value.

WHAT IT LOOKS LIKE

A string beginning with a letter and a number, with lengths stated before each value, wrapped in braces.

You will recognise it when browsing the options table: values that look like code rather than plain text.

WHY IT MATTERS

The recorded lengths must match the actual values.

Change the text without updating the lengths and the value becomes unreadable. The application treats it as empty.

THE COMMON DISASTER

A plain SQL search and replace changing a domain inside serialised data.

Every affected setting silently stops working: widgets vanish, plugin configuration reverts, theme options reset.

Nothing reports an error, which is what makes it insidious.

WHAT TO USE INSTEAD

A serialisation-aware tool: a search-replace plugin, WP-CLI, or a dedicated script.

IF YOU HAVE ALREADY DONE IT

Restore the backup. Repairing corrupted serialised data by hand is impractical at any scale.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot