Will the upcoming REST API forever change the way we use WordPress?

Will the upcoming REST API forever change the way we use WordPress?

Starting September 21st, a new merge proposal for a REST JSON API was opened on WordPress.org. At the moment, the REST API is developed as a separate plugin, but the implications of integrating it directly in the WordPress core could be huge.

The idea of using APIs to access WordPress data is not new in any case, but the way this has been done in the past was proven to be hugely ineffective. APIs are designed as a communication means between WordPress and another piece of software, like an application or 3rd party platform. They might not seem important, but, in reality, an API empowers developers to have direct access to the data (without going through a browser) and build new ways of displaying it, outside of a classic WordPress theme.

In fact, WordPress.com already has a REST API of its own. Compared to the cloud platform, self-hosted WordPress sites had to rely on an obsolete and incomplete API, called XMLRPC. Content wise, the XMLRPC API doesn’t even apply posts filters, so, for example, any shortcode that you use on your posts or pages will be exported as-is. By comparison, even Atom feeds are better because they will apply filters to a post’s content before actually exporting it. In addition, the XMLRPC API has been plagued by security issues and it’s currently turned off by default on most hosting platforms.

It’s no wonder that for a lot of plugins and themes, authors had to built their own custom APIs. Without a standardized and capable API, plugins or themes that want to introduce advanced web components, like carousels, sliders, etc., have had to find a way to access (public) WordPress data that lies on the server.

This is what we also did on the WP Mobile Pack plugin. Compared to classic, PHP-based themes, our mobile web apps are single-page apps that do not rely on refresh to display posts or pages. The only way to load new content was for a mobile web app to communicate with the server through an API of our own.

Since WordPress themes have first appeared, the web has come a long way and responsive was just the beginning. Readers now want applications, on desktop too, but especially on mobile. Since most browsing on mobile devices is done from apps (ex. Facebook), it’s quite clear that offering users an app-like environment could be key in keeping them on your website.

That’s why the release of a better WordPress API has become crucial. By integrating a powerful REST JSON API in its core, WordPress will open the door to a whole new way of writing plugins and especially, WordPress themes. Theme creators will be able to introduce advanced components in their designs or, why not, even build single-page themes, without worrying about maintaining an API as well.

I’m quite convinced that this new component is very important for the platform’s future. The frontend and administration area will no longer be tightly coupled, allowing WordPress to function as true backend platform for any type of user interface that you can imagine, both on desktop and mobile.

Tech-Biz in between guy. CEO at WPMobilePack.com. Organizer at BucharestJS & JSHacks. Passionate about entrepreneurship. Love to play 🎾, squash and 🏓.

Leave a Reply