-
Notifications
You must be signed in to change notification settings - Fork 107
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
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 |
112c1c6
to
7d4325b
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. |
@2ndkauboy have you tried Playground CLI? It might just do the trick here: |
d5ec917
to
93e4fbc
Compare
I've rebased this now that the new theme has replaced the 2020 one. I've also updated the testing instructions, now that the Node version is no longer an issue. The latest output is a fatal error for mu-plugins not being loaded, although I thought support had been added for that (I'm yet to look into what those changes entailed):
In my |
When I delete all the
|
I mistakenly thought WordPress/playground-tools#198 had been addressed, but I see it has not. |
@adamwoodnz You might be able to do what you need with the mu-plugins using playground CLI and the |
Sorry, I missed that above, I'll git it a try. Thanks :) |
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 setup:tools
yarn build
Install wp-now and run the project:
npm i -g @wp-now/wp-now
yarn wp-now
Expected