Custom WordPress Plugin API to Fulfill Downloads and Remote Updates

After developing Completionist, I wanted to make it available for free download. Instead of listing it in the WordPress.org plugins directory as I had done with Grouped Content, I wanted to create my own resources server API.

To implement the client-side connection, I used YahnisElsts’s plugin-update-checker package on GitHub. This gave me a fantastic starting place to understand what API endpoints I needed to create.

I packaged the resources server code into a WordPress plugin which runs on Purple Turtle Creative. It includes custom WordPress REST API endpoints to dynamically deliver the plugin’s details from the requested release’s ZIP file.

The endpoints are secured with nonces to ensure the download link expires. Direct requests for the plugin ZIP file are also denied via NGINX rules, so the release package can only be downloaded via a valid request to the resources API. Lastly, I implemented Google Analytics’ Measurement Protocol API to monitor the API’s traffic and performance.

Michelle Blanchette

Michelle Blanchette

Full-stack web developer, specialized in WordPress and API integrations. I'm often told my spicy passion for delivering quality solutions is refreshingly contagious. My favorite words are "efficient", "productive", and "simple".