wp_maybe_auto_update() WordPress Function

The wp_maybe_auto_update() function is used to check if a WordPress update is available, and if so, update the WordPress installation to the latest version. This function is called automatically by WordPress when an update is available.

wp_maybe_auto_update() #

Performs WordPress automatic background updates.


Description

Updates WordPress core plus any plugins and themes that have automatic updates enabled.


Top ↑

Source

File: wp-includes/update.php

function wp_maybe_auto_update() {
	include_once ABSPATH . 'wp-admin/includes/admin.php';
	require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';

	$upgrader = new WP_Automatic_Updater;
	$upgrader->run();
}

Top ↑

Changelog

Changelog
VersionDescription
3.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.