BlackFlag
BlackFlag

Reputation: 150

When is Wordpress Auto-Update Process started

I wounder how and when wordpress starts the auto-update process (if configured). I think on a (hosted) Webserver you cannot create a task for checking and starting updates for your website. Also, wordpress uses auto-updates out of the box without additional configuration.

So how does it work? When and how does wordpress check if there is a new version available? Does this happen when anybody visits your website and the update-function is started or are there other possabilities e.g. the webserver always runs an open thread for checking for updates and processing them.

I hope you understand my question.

Upvotes: 0

Views: 83

Answers (2)

user4836454
user4836454

Reputation:

Firstly, you can create a task for checking and starting updates, most commonly used is a cron job.

In wordpress 3.7 the automatic updates feature was added. To enable it you add this to wp-config.php:

define('WP_AUTO_UPDATE_CORE', true);

In default-filters.php you will find add_action( 'init', 'wp_cron' );

It runs wp-includes/cron.php on every page load from a user, which will auto-update it.

So long answer short it checks whenever a user loads the webpage.

Upvotes: 2

Lee
Lee

Reputation: 4323

I believe it uses a cron job to perform this. The only restriction is that these jobs can only be run when the website is accessed from the server ie. when people are visiting it.

I've noticed this a few times with local copies, that whenever I open them up to browse them (after not viewing them for a while), I get a local email saying my Wordpress installation has automatically been upgraded.

Upvotes: 1

Related Questions