To use the stockroom with your own theme/plugin you need to do 4 simple steps.
Setup your own stockroom WordPress website.
The stockroom is the central point where you will host the plugin and theme zip files.
Other users of these plugins/themes can download these and updates will work automatically.
Download the wp-stockroom plugin here (TODO PROPPER LINK).
Install this on your central site.
For future new plugins/themes you can just do the other 3 steps.
Create a new user that has editor permissions.
Per each plugin/theme you will create a application password for extra security.
But you can use the same user every time.
Setup the github action
In your theme/plugin add the github action.
And make sure you set the required github secrets:
STOCKROOM_URL
Required, the url to the Stockroom ie. https://wpstockroom.comSTOCKROOM_USER
Required, an existing WP user on the STOCKROOM_URL site. Should have editor permissions.STOCKROOM_PASS
Required, an application password, please use separate passwords per theme/plugin.
Add the stockroom url
If you have a theme, add in your style.css header
For themes add it in your main plugin php file.
Update URI: wpstockroom.com
For examples checkout the wp-stockroom-sample-plugin and the wp-stockroom-sample-theme.
These are working examples, that also have more details.
Include the updater script
Manually include the updater script and include it in your theme functions.php or main plugin file.
Don’t forget the change the url in the add_filter
. To the same as your Update URI, set in the previous step.
The script is the same for plugins and themes.
Composer support is planned and should be here in Q2 2023
Done
That is all.
Now when you release a new version of your plugin/theme on github it will automatically deploy it to your stockroom website.
And the users of your themes/plugins will receive updates like every other WordPress theme/plugin.