Title: wp_update_plugin
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_update_plugin( $plugin,  $feedback )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_update_plugin/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_update_plugin/?output_format=md#see-also)
 * [Source](https://developer.wordpress.org/reference/functions/wp_update_plugin/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_update_plugin/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_update_plugin/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_update_plugin/?output_format=md#wp--skip-link--target)

This function has been deprecated since 3.7.0. Use [Plugin_Upgrader()](https://developer.wordpress.org/reference/classes/plugin_upgrader/)
instead.

This was once used to kick-off the Plugin Updater.

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

Deprecated in favor of instantiating a [Plugin_Upgrader](https://developer.wordpress.org/reference/classes/plugin_upgrader/)
instance directly, and calling the ‘upgrade’ method.
Unused since 2.8.0.

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_update_plugin/?output_format=md#see-also)󠁿

 * [Plugin_Upgrader](https://developer.wordpress.org/reference/classes/plugin_upgrader/)

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

    ```php
    function wp_update_plugin($plugin, $feedback = '') {
    	_deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );

    	if ( !empty($feedback) )
    		add_filter('update_feedback', $feedback);

    	require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
    	$upgrader = new Plugin_Upgrader();
    	return $upgrader->upgrade($plugin);
    }
    ```

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

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

| Uses | Description | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  | 
| [add_filter()](https://developer.wordpress.org/reference/functions/add_filter/)`wp-includes/plugin.php` |

Adds a callback function to a filter hook.

  |

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

| Version | Description | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Deprecated. Use [Plugin_Upgrader](https://developer.wordpress.org/reference/classes/plugin_upgrader/) | 
| [2.5.0](https://developer.wordpress.org/reference/since/2.5.0/) | Introduced. |

## User Contributed Notes

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