froger-me / wp-packages-update-server

WP Packages Update Server - Run Your Own Update Server for Plugins and Themes
GNU General Public License v3.0
141 stars 39 forks source link

WP Update server Easy setup not working? #7

Closed froger-me closed 5 years ago

froger-me commented 5 years ago

I forgot one thing. I remember that wp update server allowed to do something like this:

Easy to set up.

Just upload the script directory to your server and drop a plugin or theme ZIP in the packages subdirectory. Now you have a working update API at http://yourserver.com/wp-update-server/?action=get_metadata&slug=your-plugin. Unfortunately with your plugin it does not work. I have also tried to the wp-content/wppus directory but without success.

Did you change anything?

Quoted from https://github.com/froger-me/wp-plugin-update-server/issues/6

froger-me commented 5 years ago

Hi @adrix71

I just tested the following:

As you can see, the parameters are a bit different from the original API - not including package_id results in a 404 Bad Request ; simply replace slug by package_id and it should work properly.

Remark: the actual API call includes more parameters (installed_version, php, locale, checking_for_updates, update_license_key, update_license_signature, update_type), but package_id and action are the minimum requirement for the request to be considered valid.

ghost commented 5 years ago

It is a pleasure to work with you. There are not many people who respond quickly and divide the questions into two and make separate posts. Thank you, seriously.

Damn. It's my fault. I looked at the sources but I did not notice the slug parameter renamed in package_id. Considering that I knew her well, I had simply given a quick glance at that part of the code.

I have seen the additional parameters you mentioned, but I have not studied them yet because I am currently focusing on another problem.

Thanks a lot now it works