The details below will walk you through getting set up to contribute to the code behind https://learn.wordpress.org. If you are interested in contributing to the content or translation of the content hosted on the site, you'll find further guidance in the Training Team Handbook. Content development is tracked on this GitHub repository in this project board.
If you're interested in contributing to the site, but aren't sure where to start, we have a series of workshops to help you get started.
- Contributing to Learn WordPress with code – part 1
- Contributing to Learn WordPress with code – part 2
yarn
yarn run create:old
- Visit site at
localhost:8888
yarn
yarn run create
- Visit site at
localhost:8888
- To watch for changes
yarn start:theme
run yarn run wp-env stop
run yarn run wp-env destroy
Since the local environment uses wp-env, it automatically comes with an admin user, with admin
/password
for the credentials.
While working on the theme & plugin, you might need to rebuild the CSS or JavaScript.
To build all projects, you can run:
yarn build
To build one project at a time, run:
yarn workspace wporg-learn-2024 build
yarn workspace wporg-learn-theme build
yarn workspace wporg-learn-plugin build
If you want to watch for changes, run start
. This can only be run in one project at a time:
yarn workspace wporg-learn-2024 start
yarn workspace wporg-learn-theme start
yarn workspace wporg-learn-plugin start
This project has eslint, stylelint, and phpcs set up for linting the code. This ensures all developers are working from the same style.
To lint everything run:
yarn lint
To lint one language run one of:
yarn lint:js
yarn lint:css
yarn lint:php
To check an individual project before pushing to the repo, run one of:
yarn workspace wporg-learn-2024 lint:css
yarn workspace wporg-learn-2024 lint:js
yarn workspace wporg-learn-theme lint:css
yarn workspace wporg-learn-plugin lint:css
yarn workspace wporg-learn-plugin lint:js
composer run lint
Linting will also be run automatically on each PR.
If you'd like to contribute to the project, please read the Developing Learn WordPress page in our team handbook.