How does WordPress know that a plugin is belong to WordPress plugin repository and it need to pull the updates from the WordPress SVN?

And on the other end how does it know that another plugin does not belong to repository?


Simply put it doesn't know. WordPress core periodically submits all the plugin data to api.wordpress.org (see wp_update_plugins()) which responds with updates available.

Note that plugins are downloaded as archives, SVN doesn't participate in the process directly and is only used as back-end storage mechanism.

So "knowing" that plugin doesn't belong is essentially when API cannot find matching one. Which is often problematic with it making wrong matches and custom code is needed to exclude such plugins from update check.

  • Thank you, how does it search for a match? plugin name? slug? – Bob Tolbert Jan 16 '14 at 21:05
  • @BobTolbert the actual logic is not disclosed. It's pretty fuzzy, name is definitely major factor. – Rarst Jan 16 '14 at 21:07
  • For the record, one should be able to find the behaviour quite easily...Wordpress source is readily available, so it only takes a little searching around... – Christian Mar 30 '14 at 20:36
  • @Christian updates matching code is neither part of WordPress code or open source. It's part of wordpress.org site and (to my knowledge) was never publicly shared or even described in precise enough detail. – Rarst Mar 30 '14 at 20:58
  • @Rarst correct, but you can see the code that is sending the details to the Wordpress API site and infer the update conditions from there. – Christian Mar 30 '14 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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