DEV Community

Charles Ouellet
Charles Ouellet

Posted on • Originally published at snipcart.com on

4

WordPress & Vue.js: Headless Stack w/ WP REST API

Build a Vue.js SPA on Top of Headless WordPress

I can’t believe I’m about to write about WordPress again.

I’m only (half) kidding, as the last time I played around the WP REST API, I thought it was actually pretty dope!

It was a real breath of fresh air to see a mammoth of the web industry opening up to modern trends and new paradigms.

wordpress-headless-change

So I wondered: how fun would it be to use WordPress as a headless CMS with Vue.js—my beloved frontend framework?

The answer? A whole d*mn lot of fun, as it turns out. In this post, I want to go further in-depth with that stack.

In the technical tutorial, I'll cover the following steps:

  1. Creating models with custom fields in WordPress
  2. Building a custom endpoint for the WP REST API
  3. Setting up a Vue.js single-page application
  4. Hosting the app

First, let’s define “using WordPress as a headless CMS.”

Full on JAMstack stuff here! <3

→ Read the full post here

Tiugo image

Fast, Lean, and Fully Extensible

CKEditor 5 is built for developers who value flexibility and speed. Pick the features that matter, drop the ones that don’t and enjoy a high-performance WYSIWYG that fits into your workflow

Start now

Top comments (0)

Neon image

Next.js applications: Set up a Neon project in seconds

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Get started →

👋 Kindness is contagious

Value this insightful article and join the thriving DEV Community. Developers of every skill level are encouraged to contribute and expand our collective knowledge.

A simple “thank you” can uplift someone’s spirits. Leave your appreciation in the comments!

On DEV, exchanging expertise lightens our path and reinforces our bonds. Enjoyed the read? A quick note of thanks to the author means a lot.

Okay