@muhsinlk
WordPress on the Jamstack
TOPIC
Muhammad
Muhsin
A brief history
WordPress REST API
Started off as a WordPress Plugin
👏
Merged in to Core in WordPress 4.7
WordPress as a Headless CMS!
⚡
a.k.a. Decoupled WordPress
You could use parts of WordPress now,
instead of the whole monolithic
software 🙌
REST is great, but...
🐢 Slow
☁ Constant over/under fetching
🎛 Needs multiple requests
Drawbacks of REST API
Enter GraphQL
⭐ GraphQL is a query language for your API
📢 Ask for what you need, get exactly that
󾠮 Single endpoint
Why GraphQL
📚 Get many resources in a single request
WPGraphQL
● Exposes WordPress data as GraphQL schema
● Created by Jason Bahl
● Extendable via WordPress plugins
HOW TO
Jamstack
Fast and secure sites and apps delivered by
pre-rendering files and serving them directly
from a CDN, removing the requirement to
manage or run web servers.
JAMSTACK.ORG
Static Site Generation
Content
Template
Static Site
Generator
Static Site
Why Jamstack?
⚡ Blazing fast by default
🔐 Super secure
💰 Free and open-source
🛠 Developer Experience (DX) and Tooling
⭐ Content Mesh
📚 Easy to get started and learn React, GraphQL quickly
💯 Perfect Lighthouse score — SEO, a11y, PWA
GraphQL
● Ask for what you need, get exactly that
● An alternative to REST API
● Single endpoint
● Get many resources in a single request
● Created by Facebook, now open source
HOW TO
❤
1. Fantastic Gutenberg Editor for an amazing writing
📝 experience!
2. Build with modern/favorite developer tools 🛠
like React and GraphQL!
3. Get a blazing fast ⚡ website!
The 3 wins!
WHY
Demo 🎬
Starting a Project in Frontity
npx frontity create my-project
cd my-project
npx frontity dev
WP Decoupled App
https://github.com/rtCamp/wp-decoupled
by rtCamp
Gatsby WooComerce Theme
https://github.com/sagarnasit/gatsby-theme-woocommerce
by Sagar Nasit
muhammad.dev
https://github.com/m-muhsin/muhammadmuhsin.com/
– a WordPress/ Gatsby site
Gatsby WPGraphQL Apollo
https://github.com/m-muhsin/gatsby-wp-graphql-apollo
– a simplified Gatsby site using Apollo
for a live connection to WordPress
What we covered
● WordPress + Jamstack
● REST API, WPGraphQL
● Demo
● Jamstack
SUMMARY
● Some examples
let us = {...goodness};
Let’s spread the goodness of Decoupled WordPress!
decoupled.blog
Thank you! 🙏
@muhsinlkMuhammad Muhsin
muhammad@rtcamp.com
rt.camp/join
We are hiring! 🤗
Credits - Image Sources
● Unspash for images
● Jamstack
● Jamstack website
● Static Site Generators: Content Laptop Gears
● Why Jamstack
CHOOSE

WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup