next-wp
next-wp is a headless WordPress starter combining Next.js 16, React 19, and TypeScript to decouple WordPress content management from a modern frontend. It includes built-in cache revalidation, dynamic routing, search, and deployment templates for Railway and Vercel.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | 9d8dev/next-wp |
| Owner | 9d8dev |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 1.3k |
| Forks | 317 |
| Open issues | 1 |
| Latest release | plugin-v1.1.0 (2025-11-27) |
| Last updated | 2026-02-25 |
| Source | https://github.com/9d8dev/next-wp |
What next-wp is
TypeScript-based Next.js App Router frontend consuming WordPress REST API with server-side pagination, automatic cache revalidation via webhook plugin, dynamic OG image generation, and shadcn/ui component system. Includes Vitest test suite and Docker-ready WordPress plugin for revalidation.
Get the next-wp source
Clone the repository and explore it locally.
git clone https://github.com/9d8dev/next-wp.gitcd next-wp# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires active WordPress REST API endpoint and webhook infrastructure; test webhook delivery and secret rotation in staging before production.
- Node.js 18.17+ mandatory; pnpm recommended over npm for monorepo-like separation between plugin and app code.
- Environment variables (WORDPRESS_URL, WORDPRESS_HOSTNAME, WORDPRESS_WEBHOOK_SECRET) must be managed separately per deployment environment (dev/staging/prod).
- TypeScript definitions in lib/wordpress.d.ts are bundled; custom post types or fields require manual type extension.
- Search and filtering are client-side debounced queries to WordPress REST API; high-volume searches or large post counts may benefit from Elasticsearch/Algolia abstraction.
When to avoid it — and what to weigh
- Heavy reliance on WordPress plugins requiring server-side rendering — Headless architecture breaks plugins that depend on wp-admin, theme hooks, or server-side state. Complex plugin interdependencies may not translate to REST API boundaries.
- Team lacks TypeScript or modern Node.js proficiency — Requires comfort with Next.js App Router, React Server Components, and TypeScript type safety. Learning curve steeper than traditional WordPress theme development.
- Strict budget constraints or minimal ongoing engineering — Requires maintaining two separate deployments (WordPress + Next.js), monitoring two services, and managing revalidation webhooks. Not suitable for set-it-and-forget-it projects.
- Real-time updates or collaborative editing features — Cache revalidation is event-driven (publish/update). No live collaboration or real-time subscriptions between WordPress and frontend. Polling or WebSocket extensions would require custom work.
License & commercial use
MIT License. Permissive OSI-approved license allowing commercial use, modification, and redistribution with or without attribution. No copyleft restrictions.
MIT license clearly permits commercial use without royalty or license fees. No enterprise license tier documented. Starter template; production use of WordPress backend and all dependencies remain user's responsibility to license/manage.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
WORDPRESS_WEBHOOK_SECRET must be cryptographically random and rotated; transmitted in webhook payloads—inspect TLS configuration on both ends. REST API exposure: consider rate-limiting or IP allowlisting on WordPress. Image optimization hostname must match WordPress domain to avoid SSRF via image parameter manipulation. No explicit mention of SQL injection/XSS defenses in README; rely on WordPress core + Next.js built-ins. Plugin auto-activation on Railway could mask security updates—monitor plugin changelog.
Alternatives to consider
Statamic + Laravel
Headless PHP CMS with native REST API; avoids dual-deployment complexity. Trade-off: smaller plugin ecosystem, requires Laravel backend knowledge, less React/TypeScript alignment.
Strapi + Next.js
Node.js-based headless CMS designed for API-first workflows. Trade-off: requires managing Strapi backend separately (no WordPress admin familiarity), smaller content community, more DevOps overhead.
Contentful + Next.js
Fully managed headless CMS with generous free tier. Trade-off: proprietary vendor lock-in, content modeling learning curve, higher cost at scale, WordPress ecosystem features unavailable.
Build on next-wp with DEV.co software developers
Deploy next-wp on Railway in minutes with integrated WordPress and MySQL, or connect to your existing WordPress instance on Vercel. Full TypeScript support and automatic cache revalidation included.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
next-wp FAQ
Does this require my WordPress site to run on the same server as Next.js?
What happens if the WordPress REST API goes down?
Can I use custom post types and taxonomies?
Is the revalidation plugin required for production?
Custom software development services
DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If next-wp is part of your open-source cms roadmap, our team can implement, customize, migrate, and maintain it.
Ready to modernize your WordPress front-end?
Deploy next-wp on Railway in minutes with integrated WordPress and MySQL, or connect to your existing WordPress instance on Vercel. Full TypeScript support and automatic cache revalidation included.