WordPress.org Parent Theme, 2021 edition
Development
Prerequisites
- Docker
- Node/npm
- Yarn
- Composer
Setup
-
Set up repo dependencies.
yarn setup:tools
-
Build the assets. The theme can't be activated until this step is done.
yarn workspaces run build
-
Start the local environment.
yarn wp-env start
-
Run the setup script.
yarn setup:wp
-
Visit site at localhost:8898. Note the nonstandard port, this will enable the parent theme + any child theme projects to be up at the same time.
-
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
Asset management
- Build assets once:
yarn workspace wporg-parent-2021 build
- Watch assets and build on changes:
yarn workspace wporg-parent-2021 start
History
This is started as a fork of Blockbase. The News Theme was the first iteration of this generation of new sites.