-
Notifications
You must be signed in to change notification settings - Fork 154
Switch tutorial to use wp-env and Docker #2221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Conversation
Replaces wp-now and blueprint setup with @wordpress/env and Docker for local WordPress development in the Faust.js tutorial. Updates documentation, environment example, and removes faust-tutorial-blueprint.json in favor of .wp-env.json. Changes all references and ports from 8881 to 8888 for consistency.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request modernizes the Faust.js tutorial's local WordPress development setup by migrating from wp-now to @wordpress/env (wp-env) with Docker, and standardizes the WordPress port to 8888 throughout all documentation and configuration files.
Key Changes:
- Replaced
wp-nowwith@wordpress/envfor Docker-based local WordPress development - Standardized WordPress port from
8881to8888across all configuration files and documentation - Introduced
.wp-env.jsonto manage required plugins and WordPress configuration settings
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
examples/next/tutorial/package.json |
Updated wp-dev script to use wp-env start and added @wordpress/env as a devDependency |
examples/next/tutorial/faust-tutorial-blueprint.json |
Removed obsolete blueprint file used by wp-now |
examples/next/tutorial/.wp-env.json |
Added wp-env configuration specifying required plugins, port 8888, and debug settings |
examples/next/tutorial/.env.local.example |
Updated WordPress URL to use port 8888 |
docs/tutorial/learn-faust/index.md |
Updated tutorial instructions to reference Docker Desktop, wp-env setup steps, and port 8888 throughout |
Files not reviewed (1)
- examples/next/tutorial/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Next.js Bundle Analysis for @faustwp/getting-started-exampleThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 28 out of 36 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- examples/next/tutorial/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "phpVersion": "8.3", | ||
| "plugins": [ | ||
| "https://github.com/wp-graphql/wp-graphql/releases/latest/download/wp-graphql.zip", |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Inconsistent plugin sources: wp-graphql is downloaded from GitHub releases while faustwp is from WordPress.org. For consistency and reliability, both plugins should use the same source. Consider using WordPress.org for both or document why different sources are needed.
| "https://github.com/wp-graphql/wp-graphql/releases/latest/download/wp-graphql.zip", | |
| "https://downloads.wordpress.org/plugin/wp-graphql.latest-stable.zip", |
| "lint": "next lint", | ||
| "wp-dev": "npx @wp-now/wp-now start --blueprint faust-tutorial-blueprint.json" |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script still references the old wp-now setup that was replaced by wp-env. The script should be updated to wp-env start or removed if it's no longer used, as the new workflow uses tutorial:start and other commands defined in the README.
| "lint": "next lint", | |
| "wp-dev": "npx @wp-now/wp-now start --blueprint faust-tutorial-blueprint.json" | |
| "lint": "next lint" |
| console.log('✅ .env.local already exists\n'); | ||
| } | ||
|
|
||
| // Step 2: Check if wp-env is running |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the wp-env check fails, the error is caught but no meaningful message is shown to help users understand what went wrong. Consider adding error context before starting wp-env, such as checking if Docker is running.
| // Step 2: Check if wp-env is running | |
| // Step 2: Check if Docker is running | |
| try { | |
| execSync('docker info', { stdio: 'ignore' }); | |
| } catch (error) { | |
| console.error('❌ Docker does not appear to be running. Please start Docker Desktop or your Docker daemon and try again.'); | |
| process.exit(1); | |
| } | |
| // Step 3: Check if wp-env is running |
This pull request updates the Faust.js tutorial and example project to use
@wordpress/env(wp-env) and Docker for the local WordPress development environment, replacing the previouswp-nowsetup. It also standardizes the WordPress port to8888throughout the documentation and configuration files, ensuring consistency for users following the tutorial. The required plugins and environment settings are now managed via a new.wp-env.jsonfile, and references to outdated blueprint files and instructions have been removed.Environment setup modernization
wp-nowand thefaust-tutorial-blueprint.jsonblueprint with@wordpress/env(wp-env), leveraging Docker for local WordPress development. Thewp-devscript now runswp-env startinstead ofnpx @wp-now/wp-now start. (docs/tutorial/learn-faust/index.md[1]examples/next/tutorial/package.json[2] [3].wp-env.jsonconfiguration file to specify required plugins (wp-graphql,faustwp), set the WordPress port to8888, and enable debugging options. (examples/next/tutorial/.wp-env.jsonexamples/next/tutorial/.wp-env.jsonR1-R12)faust-tutorial-blueprint.jsonfile, as it is no longer needed with wp-env. (examples/next/tutorial/faust-tutorial-blueprint.jsonexamples/next/tutorial/faust-tutorial-blueprint.jsonL1-L20)Documentation and configuration consistency
8888for WordPress instead of8881, including.env.local.exampleand.env.localreferences. (docs/tutorial/learn-faust/index.md[1] [2] [3] [4]examples/next/tutorial/.env.local.example[5]docs/tutorial/learn-faust/index.md[1] [2]These updates streamline the tutorial setup, improve reliability by using Docker, and ensure all documentation and configuration files are aligned for a smoother learning experience.