Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/keircatenation/rest-tests/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
More than an Extension: Customizing the WordPress REST API
Keiran Pillman
Webmaster, Memorial Art Gallery of the University of Rochester
Digital Collegium Pennsylvania Regional Conference, June 2025
1. Basics
2. Modifying It
3. D.I.Y. It
4. References
Basics of WordPress's REST API
WordPress's REST API was started as a plugin, but was fully integrated into core with 4.7 in 2016. It's the foundation of the block editor, enables useage of WordPress as a headless CMS, and its ability to be modified allows for custom routes and endpoints that can do quite a bit more.
Content that is public on your site is generally publicly accessible via the REST API, while private content, password-protected content, internal users, custom post types, and metadata is only available with authentication or if you specifically set it to be so.
Terminology
- A route is the name used to access an endpoint; the URI that can be mapped to different HTTP methods
- An endpoint is the function called when an individual HTTP method is called on a route
- A namespace is a way to group routes
- A request is an instance of the WPRESTRequest class, which stores and retrieves information for the current request
-