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 (currently in alpha) 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, composablesAlpha
@wpnuxt/blocksRender Gutenberg blocks as Vue componentsAlpha
@wpnuxt/authWordPress authentication (password, OAuth)Alpha
WPNuxt v2 is currently in alpha. APIs may change before the stable release. Check the GitHub releases for the latest version and changelog.

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 SWR caching for GraphQL requests
@wpnuxt/authNew authentication module with OAuth support
@wpnuxt/blocksImproved Gutenberg block rendering with Nuxt UI integration
AI ToolingMCP server for AI-assisted development
Migrating from v1? See the Migration Guide.
Copyright © 2026