Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 ?

share|improve this question
    
+1 looking for same thing :) also it will be great to have same things for plugins too! –  Sisir Jun 14 '12 at 14:01
3  
this seems like a great idea, until an automated update corrupts and takes down your whole site after the automated backup fails. –  Milo Jun 14 '12 at 15:01
    
@Milo I do not see any difference on the same possibility of corruption if you manually press the update button. Basically what I am looking for is a "bot" to automatically press that button for me. If it's gonna fail, it's gonna fail regardless of automatic or manual pressing of the update button :-) –  IMB Jun 14 '12 at 17:33
    
Well, if you trigger the update manually, you'll notice the scenario @Milo describes right away. If it was run automatcally, it might take you days or even weeks to notice. Unless of course you visit the site daily, in the case of which I wouldn't see the need for automatically triggered updates anymore... | nonetheless +1 for the question, since I'd find an answer interesting no matter what –  Johannes Pille Jun 14 '12 at 18:00
    
Yes, it happened to me once... a WordPress installed through cPanel updated by itself, the site broke because a plugin incompatibility, it was only noticed days after the fact... got rid of the "feature" once and for all. ::: If the issue is maintaining a lot of sites, take a look at InfiniteWP –  brasofilo Jun 14 '12 at 23:43

2 Answers 2

up vote 0 down vote accepted

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 ;)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.