Hi there,
Today I found out about GitHub Updater and started using it. At first I started using it in combination with WP Sync DB, but I'm also interested in using GitHub Updater to update my custom developed WordPress themes.
I'm developing custom themes for my clients locally, I use BitBucket as version control. When the theme is mostly finished, I put the WordPress installation on a testing server so the client can begin with filling the site. Meanwhile I'm continuing the development locally for the finishing touches.
My problem is as follows:
I thought I could use GitHub Updater to update my custom themes on the testing server and later on the actual live server. But, after I push a commit with an incremented version number in the style.css, WordPress isn't able to find the new theme update.
I found a workaround, but I want to know if this is intended behaviour. The update can be found when I go to GitHub Updater -> Settings -> BitBucket -> Refresh Cache.
Why can't WordPress find the update immediately after it has been pushed to BitBucket?
WordPress will find the update after 12 hours (I believe), that's why there is the need to use the Refresh Cache.
Ok, so it's a WordPress thing. Wouldn't it be possible to refresh GitHub Updater's cache with a hook?
Actually in the most recent update I've randomized the cache timeout from 6-18 hours.
If you desire an immediate update you should look to updating via a webhook. Of course this won't show in the dashboard, it would just be updated automatically with a git push. Using a webhook doesn't require a version bump, just a git push.
https://github.com/afragen/github-updater/wiki/Remote-Management---RESTful-Endpoints
Thanks for the answer, I guess I'm just using the refresh cache button then. ;)
Follow up: I followed your tutorial for setting up a webhook and it's pretty easy so I'm going to use this for sure! Thanks!
@warudin : Do you have a link to this tutorial ?
The tutorial referenced is likely the wiki link, https://github.com/afragen/github-updater/wiki/Remote-Management---RESTful-Endpoints
Most helpful comment
Actually in the most recent update I've randomized the cache timeout from 6-18 hours.
If you desire an immediate update you should look to updating via a webhook. Of course this won't show in the dashboard, it would just be updated automatically with a git push. Using a webhook doesn't require a version bump, just a git push.
https://github.com/afragen/github-updater/wiki/Remote-Management---RESTful-Endpoints