-
Notifications
You must be signed in to change notification settings - Fork 89
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
Try wp-now for local development #2343
base: trunk
Are you sure you want to change the base?
Conversation
Allows plugin and theme activation
Hi @adamwoodnz, I tested this PR locally, and both the theme and plugins were activated.
|
I give it a try, and it seems to be in the right path! Pun intended. 🙌 . Here is a recording of my testing. The first step I did is deleting the I needed two runs for the learn-wporg theme to be activated. This can be related to the missing parent theme. Other commands that are not captured are related to the building process of Learn itself like:
learn-sensei.mp4 |
Blueprints should work under Node 18 – perhaps Node 20 isn’t needed here? |
It seems Node 20 is required for blueprint files
|
@sejas That message could likely be removed now as all the required polyfills are in place. |
@adamziel , thanks for pointing that out. |
@adamwoodnz with WordPress/playground-tools#216 deployed, does the latest version of |
41acb93
to
112c1c6
Compare
Getting closer! I've updated the description to use Node 18.18.2 now, which works with the blueprint file. After moving the themes to standard locations the TT4 theme error is gone. We still have the issue with mu-plugins not being loaded, but the frontend loads as expected apart from that. The admin loads but fairly quickly fatals, looks like db issues:
|
What should create that table? An mu-plugin, by any chance? |
Sorry should have looked more closely at that. We have a setup script which should create it. Could we use a blueprint to do something similar? |
Yup, see this example: https://github.com/WordPress/blueprints/blob/trunk/blueprints/posts-via-wp-cli/blueprint.json Also see this Blueprints 101 tutorial: https://github.com/WordPress/blueprints/blob/trunk/docs/index.md |
Following the steps was not enough. I got this error running
I had to install the node packages in the theme first:
It then worked. But I also have the issue that only on the second run, plugins and themes are activated. I'm testing this a bit more now. |
Add a blueprint to enable local development. This needs to replicate everything we currently do with wp-env.
Currently does not work.
Problems
1. Theme and plugin specified in blueprint are not activated2. For wp-now to be a dev dependency, the Node 18.18.2 requirement for blueprint files requires updates to other tooling (eg. current jsdoc dependency does not support Node 18.18.2)
3.
wp-content/mu-plugins
are not loadedHow to test
Install PHP and JS dependencies as normal and build the project
composer install
nvm use
yarn
yarn workspaces run build
Switch to Node 18.18.2 and install wp-now globally
nvm use 18.18.2
npm i -g @wp-now/wp-now
yarn wp-now