A tiny argument against merging the REST API plugin into WordPress core

Normally I’d start with a history lesson, but for this I’ll cut to the chase since most of you reading this already know what I’m talking about…

Projects like Django function & thrive without their REST API in every core installation. Not being in core means the component maintainers are able to develop independently of any core release cycle – both faster & slower if need be.

Externally facing API’s are a mouse on a wheel. Just as XML-RPC is ready, REST is here to take its place. Once we are all comfortable with REST 10 years from now, something else will replace it to, and so on.

WordPress is of the size and popularity now where building wp-admin into a hybrid of REST & AJAX calls will be confusing to future contributors.

Going back and rebuilding wp-admin to be fully REST is a thankless job, and would take ten years to complete at the current pace. It’s more likely wp-admin would be replaced, which would break backwards compatibility with existing plugins. It’s akin to hiding Windows 3.1 under the 95 skin, and abandoning all previous applications. No way.

Many contributors see a core-merge as a natural graduation path to their efforts, for lots of things – even small things like ideas and recommendations. We get attached to them, and define success & ultimate acceptance as the end result being gifted to the world via WordPress core.

That path is unrealistic for most, and unhealthy for WordPress in the long run. This is why plugins exist, and why plugins are awesome. The REST plugin is one of the most awesome ones, and it should stay that way so that the team of passionate people who love it, can continue to love it by totally avoiding core conflict.

Maybe it gets bundled with WordPress like Akismet does, but it needs to be activated to work. Maybe it comes active by default, and can be disabled or deleted for those who will never need it.

A merge into core, right now, I think is still not the right call.

For years I wanted, pleaded, planned, and architects the concept of user profiles and activity streams on WordPress.com. I still think it would have been enormously popular (and still can be) but looking back, I understand now how my ideas didn’t match Matt’s overall vision and needs for a product that he designed originally.

I think the REST API is a similar thing.

This project is so huge and the media attention so great, it is now bigger than itself. It’s almost less about the code/team/effort, and more about the spiritual support and endorsement of those efforts. Maybe that’s what I’m turned off by right now – that it’s been so long, it’s impolite to suggest a core-merge of this code isn’t the right thing to do.

FWIW, even if it had 100% API coverage, I still don’t think I’d want it on in core WordPress by default, because spiritually I’m really vibing on features like this being optional plugins right now, and I’m afraid that a core-merge will complicate the momentum and progress of the REST API core code once it’s in.

My $0.02. Don’t mean to offend. And I’m down to help anyone no matter what the end results ever are. 💜
P.S. I wrote this totally from the iOS app, which was a pretty pleasant experience. Great work, from a team of developers outside of WordPress core.


6 responses to “A tiny argument against merging the REST API plugin into WordPress core”

  1. This is the first time I have thought about REST API like that. And I happen to agree with you for the most part. Keeping REST API in the form of a pre-installed (and maybe activated) plugin makes a lot of sense.

    I have been studying GraphQL a bit and if it grows into what wise folks like Scha and those at Apollo Stack suggest it will, then it will be a lot sooner than 10 years before we end up with a new way of dealing with WP and APIs. For that reason and more, I agree.

    1. jasonbahl Avatar

      Good article, and I think I agree. A year ago I thought a core merge was the right move, but a lot has happened in the past year, such as the emergence of GraphQL which I believe will be starting to replace REST in the very near future in a lot of systems. . .Github Recently announced their GraphQL API, the Calypso documentation hint at WordPress.com implementing a GraphQL layer themselves (https://github.com/Automattic/wp-calypso/blob/master/docs/our-approach-to-data.md) to make use of Relay and Matt Mullenweg even starred an existing WP GraphQL repo (https://github.com/tim-field/graphql-wp/stargazers?page=2) and said Repo changed to GPL just days after he starred it. . .

      I’ve got a WPGraphQL Plugin in the works as well (hope to push it up to Github soon. . .), and I also have a non-WordPress Apollo Server setup that can query data from our network of 5+ WP Sites from one non-WP endpoint. . .so while REST is nice, it’s 16 years old already and GraphQL (and what’s next?) is already beginning to replace it. . .Github announced their GraphQL API recently, and I think we’re about to see other big companies announce their GraphQL API’s, including either a private or public WordPress.com GraphQL API.

    2. You have a great eye for details, sir 🙂

  2. JJJ

    This is my first time on your site (I think). Got here via WP Mayor.

    My question: How does a normal Wordpress user benefit from REST API?


    1. They don’t, by itself. It’s kinda like RSS, where it’s really up to other third-party things to tie it together with other useful applications.