Title: update_option_{$option}
Published: April 25, 2014
Last modified: August 20, 2026

---

# do_action( “update_option_{$option}”, mixed $old_value, mixed $value, string $option )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#user-contributed-notes)

Fires after the value of a specific option has been successfully updated.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#description)󠁿

The dynamic portion of the hook name, `$option`, refers to the option name.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#parameters)󠁿

 `$old_value`mixed

The old option value.

`$value`mixed

The new option value.

`$option`string

Option name.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#source)󠁿

    ```php
    do_action( "update_option_{$option}", $old_value, $value, $option );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/option.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/option.php#L1019)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/option.php#L1019-L1019)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#related)󠁿

| Used by | Description | 
| [update_option()](https://developer.wordpress.org/reference/functions/update_option/)`wp-includes/option.php` |

Updates the value of an option that was already added.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | The `$option` parameter was added. | 
| [2.0.1](https://developer.wordpress.org/reference/since/2.0.1/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/update_option_option/?output_format=md#comment-content-5710)
 2.   [orkans](https://profiles.wordpress.org/orkans/)  [  5 years ago  ](https://developer.wordpress.org/reference/hooks/update_option_option/#comment-5710)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupdate_option_option%2F%23comment-5710)
    Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupdate_option_option%2F%23comment-5710)
 4. It’s worth mentioning that this hook won’t fire if the old option value is exactly
    the same as the new one, meaning it won’t change anything in DB.
 5. If you want to fire some additional code on update option event, I suggest using`"
    pre_update_option_{$option}"` hook instead.
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupdate_option_option%2F%3Freplytocom%3D5710%23feedback-editor-5710)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupdate_option_option%2F)
before being able to contribute a note or feedback.