The WordPress REST API refers to an interface that allows communication with the database used by WordPress. API stands for “application programming interface”. It enables communication between different programs according to a defined system. It’s comparable to a dialog between two people who only understand each other when they use the same language. You can find more information in our article on APIs.
The abbreviation REST means “representational state transfer”. The principles for information exchange were developed by US computer scientist Roy Fielding in 1994:
- Uniformity: The URLs for accessing resources must be uniform, consistent, and accessible via a common approach like GET.
- Client-server separation: If the server-side technology changes (e.g. WordPress), the client-side application (e.g. app) must still be able to access it.
- Stateless: The server doesn’t change its state due to a new request via the API and doesn’t store the request.
- Cache capability: This provides for high speed and conformity on the server or client side.
- Layered system: Access is possible over multiple layers.
- Code on demand (optional): Code for local execution is only sent to the client when needed.
In WordPress, these requirements have been standard in the core – i.e. the heart of the content management system – since version 4.7. Before that, there was the plug-in “WP REST API (WP API)” until May 13, 2018. As of WordPress version 5.x, elements were added to the system core to expand the existing communication possibilities with other (web) applications and apps.