💀 It's headless WordPress! - https://nextjswp.com
- Next.js w/ TypeScript
- React Components from Mantine
- WordPress in a Docker container with PHP 8.1
- Apollo Client w/ WP GraphQL
- On-demand revalidation
- Date based blog routing (
YYYY/MM/DD/slug
) - Yoast SEO support
- CPT UI support
- Menus support
- Preview support
- Comments support
- Post reactions support
- Advanced Custom Fields support
- ESLint, Stylelint, Prettier, and more!
This project is a monorepo managed by Turborepo.
nextjs-wordpress
├── apps
│ ├── docs
│ ├── nextjs
│ └── wordpress
├── packages
│ ├── eslint-config-custom
│ ├── nextjs-wordpress-plugin
│ ├── nextjs-wordpress-theme
│ ├── prettier-config-custom
│ └── tsconfig
└── turbo.json
The applications directory. This includes the documentation, Next.js (frontend), and WordPress (backend).
Shared packages used by the apps. This includes ESLint, Prettier, and TypeScript configs. As well as the WordPress plugin and theme.
The repo config file. Learn more about configuring Turborepo.
-
Clone this repo:
npx degit gregrickaby/nextjs-wordpress nextjs-wordpress
- Set up your dev environment:
npm run setup
The docs are a work in progress. You can view them here.
Contributions are welcome! Please see the contributing guidelines for more information.
A special thanks to the following people:
- Rae Van Epps wrote the bulk of the PHP code for the Next.js WordPress Plugin, giving this project a jumping off point.
- Amor Kumar insipired me to deep dive into Docker with his BYOB Headless WordPress project.
- John Jeeves and Adam Hollister for their work on registering Gutenberg Blocks in the WordPress REST-API.
- Jason Bahl for his tireless work on WP GraphQL, and all of our chats/DMs over the years.
I ❤️❤️❤️ the open source community, and hope this project inspires you to create something awesome.
Cheers! 🍻