auto_update_plugin trouble with self-hosted plugin
Dave McHale
2014-10-22 14:48:58 UTC
I'm having trouble configuring WP's auto updates to work with a plugin that
I have hosted on my own server. After troubleshooting within the plugin
without luck, I finally stripped everything out to a simple plugin that
ONLY tries to update itself, with no other functionality.

require_once 'classes/plugin-updates/plugin-update-checker.php';
$myPluginUpdateChecker = new PluginUpdateChecker_1_4(

add_filter( 'auto_update_plugin', '__return_true' );

The Plugins dashboard shows that an update is available for the plugin, and
clicking "Update Now" functions properly, but ideally I would like this
plugin to automatically update when WordPress goes to run its 12-hour cron
to update plugins.

By manually running the cron, I've proved that all wordpress.org-hosted
plugins *do* update automatically... so I guess my question is, what's
different? What do i need to DO differently in order to get my self-hosted
plugins to behave in the same fashion as plugins hosted in the official

In the end of this, I'd ideally like for ONLY my plugin to automatically
update (by using code similar to what's found here, only reversed logic...
) but for now I'm trying to just use the __return_true value to prove that
it works at ALL.

Thanks in advance! I've spent countless hours trying to get this to work,
and I'm just at my wit's end with it. I've about run out of ideas to try,
so I'm hoping someone can point me in the right direction.

Janis Elsts
2014-10-23 08:08:15 UTC
This post might be inappropriate. Click to display it.