Web developer, Ryan Dunn, recently attended Baltimore Word Camp, an annual professional event focused on the content publishing platform WordPress. Read on to find out about his takeaways and their implications for website management.
So the WP REST API allows any WordPress site that is updated to version 4.7+ to be able to remotely retrieve JSON data for just about every item that you would want to output on a normal site. The most basic retrieval method is to send a GET request to http://www.yoursite.com/wp-json/ and the response is your site’s posts, pages, media, etc. formatted in JSON. There are many endpoints to narrow down your requests. More information about the details can be found in the REST API Handbook.
WordPress is always going to be open source and a community driven project. Anyone can jump in and participate in core updates and make plugins to extend its capabilities. This REST API was actually at first a plugin created by someone that had a bright idea and the perseverance to complete it. That plugin got adopted into the core in 2015 not just because the WP team wanted it, but because it was being used by the community so much. The WP team listened and adopted. This is one of the many ways that the WordPress community has broken the mold of the traditional WordPress setup and new ideas are in constant development by the community. The WordPress community drives its future, not its internal developers. The trend that I’ve been seeing is that people love its familiar backend dashboard and the MySQL DB structure, but are doing more and more to change how the front end is structured to streamline development and incorporate DRY (Don’t Repeat Yourself) principles. And WordPress is constantly listening.