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.
  • 3
    Why would you want to install a plugin that does something WP already does out of the box?
    – moraleida
    Commented Jun 10, 2012 at 19:43
  • 2
    Absent some example of a non-niche use case, Close-voted as too localized. Commented Jun 10, 2012 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
    Commented Jun 10, 2012 at 22:55
  • @brasofilo Thanks! InfiniteWP was just what I was going to build. Now I don't need to... Commented Jun 12, 2012 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. Commented Jun 12, 2012 at 18:25

2 Answers 2


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().

  • 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. Commented Jun 12, 2012 at 18:29

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


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