Update WordPress automatically on its own

Is it possible to update WordPress automatically so that when there’s a new version of WordPress, my installation will update itself automatically without me having to login to admin > update ?

Related posts

Leave a Reply

2 comments

  1. Yes it is. Though perhaps not in the way you might be thinking.

    If you check out some of the shared hosting sites, many of them have the capability to automatically update your WordPress site.

    Of course, as Milo has said, it can be rather disastrous too. Especially on a site with lots of plugins installed.

    So the answer is to have an external script that does a “manual” upgrade as per the WordPress documentation.

    Firstly, the script needs to check to see if an upgrade is needed. The code is always available as “http://wordpress.org/latest.zip” so you could write a PHP script that checked if an HTTP head request to that URL returned a 304 (not changed) or a 200. If the later, you would start the download and then …

    You will want to make the script do a backup of both the site and the database before doing the upgrade of course.

    I would also recommend a script that can restore the site quickly. For when it all goes horribly wrong 😉