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.

What I want to do

I want to upgrade Wordpress programmatically to a later version. That I want to do with PHP, lets say from http://www.example.com/?upgrade_wp=true

I already know how to get the URL of the latest version so I don't having any problem with checking for versions or finding the right URL.

Answers I want

  • A link to a tutorial of how this is done.
  • A plugin that does this and not so much more.
  • A hint to the functions that I need to use.

Answers I don't want

  • The way to do it with SVN or subversion.
  • Answers containing Wordpress MU.
  • How to manually doing this.
  • How to do this with other code than PHP.
share|improve this question
3  
Why would you want to install a plugin that does something WP already does out of the box? –  moraleida Jun 10 '12 at 19:43
2  
Absent some example of a non-niche use case, Close-voted as too localized. –  Chip Bennett Jun 10 '12 at 19:49
5  
Answers I want/don't want = invitation for being sarcastic, but I'll refrain myself & instead some useful info: study how InfiniteWP does it... –  brasofilo Jun 10 '12 at 22:55
    
@brasofilo Thanks! InfiniteWP was just what I was going to build. Now I don't need to... –  Jens Törnell Jun 12 '12 at 18:23
    
@ChipBennett How can update Wordpress from the outside be too localized? Many people have done that. Just not that many people show their code like InfiniteWP. –  Jens Törnell Jun 12 '12 at 18:25
show 2 more comments

closed as too localized by Chip Bennett, m0r7if3r, onetrickpony, Chris_O, Brian Fegter Aug 27 '12 at 5:59

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 1 down vote accepted

A hint to the functions that I need to use.

I'm not sure why you'll want to mimic WP's default behavior, but most of the update logic lies on wp-admin/update-core.php

Check for do_core_upgrade().

share|improve this answer
    
For my question this is the right answer. Thanks! However I solved the problem by using InfiniteWP. It's a self hosted admin for administrating multiple sites at the same time. That way I don't need to build it myself. –  Jens Törnell Jun 12 '12 at 18:29
add comment

The trigger function for core update seems to be wp_update_core(), which calls Core_Upgrader class (source).

share|improve this answer
    
Thanks! Voted up. –  Jens Törnell Jun 12 '12 at 18:29
add comment

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