WordPress.org Block Theme
A block-based child theme for WordPress.org, plus local environment.
Once set up, this environment will contain some shared plugins (Jetpack, Gutenberg, etc), some mu-plugins
(wporg-mu-plugins, mu-plugins/pub), and both sets of parent and child themes. The current site uses wporg
parent and wporg-main
child; while the new design will be done with wporg-parent-2021
and wporg-main-2022
(this repo). The "theme-switcher" in mu-plugins
here should control which theme is used, based on the requested page.
Development
Prerequisites
- Docker
- Node/npm
- Yarn
- Composer
Setup
-
Set up repo dependencies.
yarn setup:tools
-
Start the local environment.
yarn wp-env start
-
Run the setup script.
yarn setup:wp
-
Visit site at localhost:8888.
-
Log in with username
admin
and passwordpassword
.
Environment management
These must be run in the project's root folder, not in theme/plugin subfolders.
-
Stop the environment.
yarn wp-env stop
-
Restart the environment.
yarn wp-env start
-
SSH into docker container.
yarn wp-env run wordpress bash
-
Run wp-cli commands. Keep the wp-cli command in quotes so that the flags are passed correctly.
yarn wp-env run cli "post list --post_status=publish"
-
Update composer dependencies and sync any
repo-tools
changes.yarn update:tools