Title: register_update_hook
Last modified: August 19, 2016

---

# register_update_hook

 *  [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/register_update_hook/)
 * Hello all,
 * I’m developing a plugin and I need to trigger a function only when the plugin
   is updated (via the WordPress admin interface, of course). Is there a way to 
   do this? I know we have register_activation_hook, but this is not triggered during
   the update. Any thoughts?
 * Thanks,
    camu

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/register_update_hook/#post-1563481)
 * bump
 *  Thread Starter [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/register_update_hook/#post-1563528)
 * bump again
 *  [lelkoun](https://wordpress.org/support/users/lelkoun/)
 * (@lelkoun)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/register_update_hook/#post-1563589)
 * bump
 *  Anonymous User
 * (@anonymized-3085)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/register_update_hook/#post-1563590)
 * I add an action to init
    `add_action('init','my_update_routine',1);`
 * and do a check for the existence of a value in the database (plugin version number),
   and only including the upgrade routine if necessary, otherwise returning false.
 *  Thread Starter [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/register_update_hook/#post-1563591)
 * Yeah, I ended up doing the same exact thing 🙂
 * Camu

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘register_update_hook’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/register_update_hook/#post-1563591)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
