WordPress: REST API
2h 8mIntermediate2020-03-12
Authors

Morten Rand-Hendriksen
Senior Staff Instructor, Speaker, Web Designer, and Software Developer
Course details
Developers can interact remotely with a WordPress site from a client-side or external application by using the WordPress REST API. Using JSON objects, this API allows you to create and send content to a site, request information from a site, update existing content, and even create single-page applications on top of WordPress. In this course, instructor Morten Rand-Hendriksen takes a detailed look at the WordPress REST API, explaining what it is and how you can use it to build experiences both inside WordPress and in standalone third-party apps.
Morten begins by providing an in-depth look at how the REST API works, discussing how it allows clients to access the data in a WordPress site without going to the WordPress site itself. He demonstrates the use of routes, endpoints, requests, responses, and more. Plus, he provides several practical examples of how the WordPress REST API can be used in the real world.
Morten begins by providing an in-depth look at how the REST API works, discussing how it allows clients to access the data in a WordPress site without going to the WordPress site itself. He demonstrates the use of routes, endpoints, requests, responses, and more. Plus, he provides several practical examples of how the WordPress REST API can be used in the real world.
Skills covered
WordPressContent Management Systems (CMS)APIsFull-Stack Web DevelopmentWeb DevelopmentOpen SourceSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - RESTful WordPress through an API
- 02 - Prerequisites for this course
1. Exploring the WordPress REST API
- 03 - What is the WordPress REST API
- 04 - What are RESTful APIs and JSON
- 05 - Routes and endpoints
- 06 - Communicating with the REST API
- 07 - Explore the REST API response
- 08 - Useful routes - A quick reference
- 09 - Expanding the response with embeds
- 10 - Challenge - Find posts in a category
- 11 - Solution - Find posts in a category
2. Modify the REST API Response
- 12 - Notes on modifying a REST API response
- 13 - Add custom post types and taxonomies
- 14 - Add custom fields to the response
- 15 - Challenge - Add fields to the response
- 16 - Solution - Add fields to the response
3. Authentication and Authorization
- 17 - Authentication and authorization
- 18 - Basic authentication (development only)
- 19 - Cookie authentication
- 20 - JWT - JSON Web Token authentication
- 21 - Add JWT support with a plugin
- 22 - Test JWT authentication via REST client
4. Practical Examples
- 23 - Four practical examples
- 24 - Read only - Load next post using REST API
- 25 - Cookie authentication - Front-end editing
- 26 - Basic standalone app
- 27 - JWT authentication - Third-party editing
- 28 - Challenge - Add dynamic related posts navigation
- 29 - Solution - Add dynamic related posts navigation
Conclusion
- 30 - Next steps
Related courses
- Building a Headless WordPress App with REST API
- WordPress: Developing Blocks with Gutenberg
- Build with AI: Vibe Coding a YouTube-to-Blog Pipeline Automation Tool with Windsurf
- WordPress: Plugin Development
- WordPress: Customizing WooCommerce Themes
- Building a Headless WordPress Site with Gatsby
- WordPress: Speeding Up Your Site
- WordPress: Understanding the New Paradigm