WordPress REST API now in core WordPress 4.4

David Nash wordpress Leave a Comment

Oh no, Acronyms! Or as I like to say, ON,A!

What is REST? It’s a contract of REpresentational State Transfer. What is an API? An Application Programming Interface.

So what does all this mean? It means that you can use HTTP to send and receive data to web servers. HTTP is HyperText Transfer Protocol, but let’s keep this simple. Usually when you access websites, your browser sends GET requests to the web server. If you fill out a form it will often be a POST requst (because you’re posting data to it).

“But WordPress is has always been a web-based system” I hear you say. It has, but it’s always been tied to the WordPress software, that needs to run in a web-browser.

Proving a REST API means that the way you interact with it is now “abstracted”. You send simple commands to retrieve and send data. Obviously you wouldn’t send it yourself,  you’d write your own program to do it, in a format called JSON – basically, javascript.

Why would WordPress do this? Essentially, to see what will happen. They’re basically providing a set of very flexible tools, allowing programmers to create whatever programs they can imagine. Some ideas that come to mind are phone apps that allow you to easily post photos to your blog; simple integration with other web systems (think sharing from Facebook to WordPress); and making it easy to post from simple devices (such as low-power devices such as Arduino) to WordPress.

WordPress runs on a programming language called PHP. With a REST API you no longer need to know or use PHP to interact with WordPress. Someone might create a totally new front-end to WordPress – such as in Python or Ruby.

The API should mean increased growth for WordPress, greater flexibility, and hopefully some interesting combinations of technologies that no one’s really thought of before.

Up until now the REST API has been a plugin, but from WordPress 4.4 it is now part of the core system.


Leave a Reply