REST API with WordPress Core

“An ounce of performance is worth pounds of promises.”

“RESTful web services are getting ready for enterprises”

“73% of the APIs are RESTful.”

So in usage terms, REST simply wins against SOAP for programmable web.

However, in this text , we are going to understand REST API usage in the context of WordPress.

Target Audience

Mostly web developers.

Software engineers and technical individuals will also benefit and get insights in WordPress architecture.


WordPress is ubiquituous.

Ever since the middle of 2015, the WordPress community was busy in implementing

advents of REST API to the WordPress core.

With release of WordPress version 4.7, tight and official integration of RESTful API with WordPress took place.

WordPress(WP) has further increased its credibility with this milestone achievement.

Most of the benefits of REST API are directly inherited in the WP core, like

  • ease in data exchange with couple of established mechanisms
  • minimized application workload
  • seamless cross platform communication


Web services are a gamut of HTTP.

In HTTP, the POST, GET, UPDATE, and DELETE requests allows us

  • to create
  • to read
  • to update and
  • to delete

content, respectively.

“ Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”

Key Considerations when using REST API are

  • Resources are main components of REST. They are designated as URLs.
  • Resources in REST API are universal. They can talk to components outside WordPress as well.
  • REST follows client-server model
  • REST services can interact with non-REST services and vice-versa.
  • To modify data, we should use POST requests instead GET requests.
  • We should prefer logical URLs in place of using physical URLs.

What enhancements REST imparts on WordPress

“Before software can be reusable it first has to be usable.”

There were lot of shortcomings  that WordPress had in its default state without REST API integration.

With this revolutionary change, advantages are enormous.

We can create WordPress web application that contains

  • Specialized editors
  • Website management tools
  • Protocols with stateful communications, hence performance increased
  • Third party support, i.e. interaction with websites coded in other programming languages
  • Solid and secure authentication


What was the problem in previous WordPress API

  1. It was NOT modular.

REST API gave WordPress UNIX philosophy.

Composing applications out of simple parts connected by well defined interfaces

It saves us  time on debugging and reduces chances for errors.

Even smaller parts can be removed and added to the system as and when required.

  1. Communication with non-WordPress or non-PHP services was cumbersome.

WordPress already had API of its own for a quite time.

In fact, if you are a WordPress developer and if you have ever coded a plugin for WordPress, you might already be aware that WordPress uses its API to interact with any kind of extension including plugins.

However, the old WordPress API was ideal for internal processes such as talking to and exchange data with plugins, but hardly could integrate with external services.

REST API, on the other hand, is the perfect match to allow WordPress to interact with services outside of WordPress regime.

In other words, with REST API on board, WordPress can interact with all types of websites on the Internet.

Extra Facility of Remote or Mobile Management of Web applications

WordPress 4.7 leverages safety measures of REST API including

  • Cookie-based authentication
  • OAuth authentication

Cookie-based authentication is applied for plugins and themes, whereas OAuth

authentication (relying on is used to authenticate

  • desktop clients
  • mobile clients and
  • web based clients.

Therefore with mobile-like devices in picture,  REST API essentially enables remote management for WordPress.

Administer and manage your WordPress site from a desktop computer or a mobile application, without accessing actual WordPress admin panel at all.

JSON being another universal part of REST, WordPress website now is natively supported by  two major operating systems – Android and iOS.

We hope this text has become useful to you and strengthen your WordPress and REST API understandings.

 “A good programmer is someone who always looks both ways before crossing a one-way street.”

Continue exploring more at..

Simply to read more articles on

  • web application development
  • eCommerce related ideas or
  • to  get practical inputs or techniques to enhance your own mobile application navigate to

Bliss Web Solution Pvt. Ltd. is a top-notch web development company specializing in optimization of  high traffic websites.

To delve deeper into technicality or optimize your large scale Magento web portal, just drop an e-mail to us at

and we will reply you within 24 working hours.

You can freely attend weekend discussions held at our office in Ahmedabad.

Just call us on  +91 98256 77818 to raise a ticket or to input new project in our system to complete it within tight deadlines of time.