Modern boilerplate for headless projects with WordPress Bedrock (backend) and Nuxt 4 (frontend). Includes complete Docker configuration, GraphQL, WooCommerce, and sitemap proxy for SEO.
- β WordPress Bedrock - Modern structure with Composer
- β Docker Compose - NGINX, PHP 8.2, MariaDB, Redis, MailHog
- β WPGraphQL - Complete GraphQL API
- β WooCommerce + WPGraphQL WooCommerce - Headless e-commerce
- β Yoast SEO - SEO and sitemap generation
- β Redis Object Cache - Object caching for better performance
- β Nuxt 4 - Vue.js framework with SSR
- β Pinia - State management
- β Apollo Client - GraphQL client
- β Bootstrap 5 + SCSS - Styles and components
- β Sitemap Proxy - Sitemap URLs rewritten to frontend domain
wordpress-vue-boilerplate/
βββ backend/ # WordPress Bedrock + Docker
β βββ config/ # Bedrock configuration
β βββ docker/ # Dockerfiles and configs
β βββ web/ # Document root
β βββ composer.json # PHP dependencies
β βββ docker-compose.yml
β
βββ frontend/ # Nuxt 4 Application
βββ pages/ # App pages
βββ assets/ # SCSS, images
βββ server/ # API routes (sitemap proxy)
βββ nuxt.config.ts # Nuxt configuration
βββ package.json
git clone https://github.com/reandimo/wordpress-vue-boilerplate.git
cd wordpress-vue-boilerplatecd backend
# Copy environment variables
cp .env.example .env
# Edit .env and generate new salts at: https://roots.io/salts.html
# Install WordPress dependencies
docker compose run --rm php composer install
# Start Docker services
docker compose up -dAccess http://localhost:8080 and complete the WordPress installation.
Activate plugins from WP Admin:
- WPGraphQL
- WPGraphQL WooCommerce
- Yoast SEO
- WooCommerce
- Redis Object Cache
cd ../frontend
# Install dependencies
npm install
# Copy environment variables (already configured for localhost:8080)
cp .env.example .env
# Start development server
npm run devAccess http://localhost:3000 to see your application.
- Backend README - Docker setup, WordPress, plugins, troubleshooting
- Frontend README - Nuxt configuration, environment variables, build
- Sitemap Proxy Guide - Sitemap proxy guide for SEO
| Service | Port | URL |
|---|---|---|
| Frontend (Nuxt) | 3000 | http://localhost:3000 |
| Backend (WordPress) | 8080 | http://localhost:8080 |
| WP Admin | 8080 | http://localhost:8080/wp/wp-admin |
| GraphQL Endpoint | 8080 | http://localhost:8080/graphql |
| MailHog (Email UI) | 8025 | http://localhost:8025 |
| MariaDB | 3306 | localhost:3306 |
| Redis | 6379 | localhost:6379 |
The GraphQL endpoint is available at http://localhost:8080/graphql
query GetPosts {
posts(first: 10) {
nodes {
id
title
excerpt
date
author {
node {
name
}
}
}
}
}query GetProducts {
products(first: 10) {
nodes {
id
name
price
image {
sourceUrl
}
}
}
}- Change
WP_ENVtoproductionin.env - Use secure passwords
- Configure HTTPS with SSL certificates
- Consider external Redis for better scalability
- Configure automatic backups
cd frontend
npm run buildDeploy the .output folder to your hosting service (Vercel, Netlify, etc.)
Contributions are welcome! Please:
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
- Roots/Bedrock - WordPress boilerplate
- WPGraphQL - GraphQL for WordPress
- Nuxt - Vue.js framework
- WooCommerce - E-commerce for WordPress
If you encounter any issues or have questions:
- Open an Issue
- Check the detailed documentation
Made with β€οΈ for the community