I asked it here and found no response so far.

Here is a sample entry from the active_plugins line of WP_OPTIONS table:


My question is what are these s: entries? (s:35, s:19, s:27)

  • 4
    It's serialized data. The s: indicates the length of the string that follows. – Gabriel Nov 9 '15 at 14:48
  • I answered a similar question here, Gabriel is right it is serialized data. – Howdy_McGee Nov 11 '15 at 2:05

That entry is a PHP serialized array. The serialize method takes an array and stores it's value as a string so it can be stored elsewhere - like a database.

In the above example, the "s:" entries stand for "string:". With a serialized array, each element's data type is represented by a letter (a, s, o, etc) followed by a colon, then an optional length, and then a value. So...


 a:5:{... - array, 5 elements 
 i:0 - integer, value of 0
 s:35:"add-from-server/add-from-server.php" - a string that is 35 characters long, and then the string itself

Edit: by the way, you should always interact with these by using the PHP methods to serialize and unserialize - if you removed the ".php" from that string above, you would break serialization unless you also changed the length in "s:35" to "s:31" (since four characters were removed). It's easy to break a WordPress installation by hand-editing serialized arrays.

  • Many many t h a n k s! @phatskat – Bengali Nov 9 '15 at 15:06

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