WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to modify a plugin and in which i require to update a value in wp_options which has multiple values .

My option_name is ws_mem_options

and the

option_value has values such as in format

s:20:"pro_sp_email_subject";s:36:"Thank You! (instructions for access)";s:20:"mem_email_message";s:309:"Thanks %%first_name%%!


Transaction ID: %%txn_id%%
Charges today: $%%amount%%

Your order can be retrieved here:
( link expires in %%sp_access_exp%% )

If you have any trouble, please feel free to contact us.

Best Regards,
Don't Just Watch TV, Participate!";s:120:"mem_coupon_codes";s:66:"CHRISTMAS-25|25%|01/01/2021

how can i add more values to

share|improve this question
Is this value in full? Is it taken from DB directly or some function's output? It looks like multiple serialized values glued together. – Rarst Dec 1 '13 at 14:10

What you are looking at is serialized data-- possibly multiple bits of serialized data as @Rarst noted. The Options API will serialize and unserialize automatically so all you need to do is:

$data = get_option('optionkey');
// $data will be unserialized into whatever data type it was originally, object, array, etc
// manipulate your data with ordinary PHP object and array techniques



share|improve this answer

If you have access to run SQL queries, you can select the option_value you want to change and update it with new option_value by running an SQL query.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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