Getting Started

Introduction

WordPress + Nuxt via GraphQL

WPNuxt connects WordPress to Nuxt 4 via GraphQL, giving you type-safe composables for fetching content.

WPNuxt v2 is a complete rewrite for Nuxt 4, with a simplified API, better TypeScript support, and new features like server-side caching and AI tooling. See what's new →
New to WPNuxt? Start with How WPNuxt Works to understand the architecture, then follow the Quick Start to build your first project.

Why WPNuxt?

  • Type-safe - Auto-generated TypeScript types from your WordPress schema
  • Simple API - usePosts(), usePages(), useMenu() - just works
  • Extensible - Add custom queries, get custom composables

Packages

PackagePurposeStatus
@wpnuxt/coreGraphQL integration, composablesStable
@wpnuxt/blocksRender Gutenberg blocks as Vue componentsStable
@wpnuxt/authWordPress authentication (password, OAuth)Stable
wpnuxiCLI for scaffolding and diagnosticsStable

Quick Look

<script setup lang="ts">
const { data: posts } = await usePosts()
</script>

<template>
  <article v-for="post in posts" :key="post.id">
    <h2>{{ post.title }}</h2>
    <div v-sanitize-html="post.excerpt" />
  </article>
</template>

That's it. No GraphQL queries to write, no types to define.

What's New in v2

WPNuxt v2 is a complete rewrite built for Nuxt 4:

FeatureDescription
Simplified APIusePosts() instead of useWPPosts() — cleaner, more intuitive
Better TypeScriptFull type inference from your WordPress GraphQL schema
Server CachingBuilt-in multi-layer SWR caching for GraphQL requests
@wpnuxt/authAuthentication module with password, OAuth, and external providers
@wpnuxt/blocksGutenberg block rendering with Nuxt Image and Nuxt UI integration
AI ToolingMCP server for AI-assisted development and code generation
Serverless ReadyBuilt-in sanitization that works on Vercel and other serverless platforms
See the full overview of everything new in v2.
Migrating from v1? See the Migration Guide.
Copyright © 2026