Can someone please explain how to read the letters, numbers, and colons in the wordpress database?

For example:


in the wp-capabilities table.



1 Answer 1


Those are php serialized constructs. The one you have there is an array. If you are looking to read them as a human, it breaks down like this:

Array: a:size:{key definition;value definition;(repeated per element)}
String: s:size:value

There are other possibilities that you can read more about here.

Generally, you should never modify these directly since unless you do it perfectly you will break the record. To manipulate them with php you'd unserialize(), manipulate, and then reserialize(). e.g.

//get $my_serialized_variable from database
$value = unserialize($my_serialized_variable);
$value[] = $element_i_want_to_add;
$serial = serialize($value);
//write serial to database

If you absolutely have to modify it in the database, use a tool like this to make sure you have a valid serial.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.