WordPress to get a JSON REST API

WordPress to get a JSON REST API

John Hewick

Upcoming versions 4.4 and 4.5 of WordPress will soon have a REST API according to recent announcements. This will help with the inbuilt XML-RPC interface and through simple HTTP requests, developers will now be able to create, edit, and upload data whether in pages, posts, comments, users or taxonomies.

Way back in 2012 this idea was floated at the WordPress Contributor Summit and a plugin, the WP REST API (WP API) plugin, was rolled out.

This plugin was used as a testing ground by the WordPress core team and has been put forward for full integration into the CMS as a whole ever since. The plugin has been used and fiddled with by developers since its introduction, even used in some production environments. This helped to find and fix any security and technical flaws. Now they have decided that it is ready for a full integration.

The integration will happen in two parts.

First, the infrastructure code will be added to the upcoming 4.4 release of WordPress. This will include the code for routing HTTP requests as well as the engine to handle incoming query requests and custom APIs.

The second stage will come with 4.5 and will handle API endpoints where most of the work will be carried out. This is the delicate part of the operation where there could be bugs that could delay the final rollout.

Once this has been released, there are further plans to try to build a new API to handle centralised authentication via OAuth to WordPress.

John Hewick

Author John Hewick

More posts by John Hewick