Welcome!
If you want to contribute to WP core, first give a look at the handbooks.
With this you'll have:
- apache, svn and wp-cli available at c_wpsvn container
- nodejs and grunt (with
watch
running) in c_wpsvn_nodejs container
This is a work in progress, but it's pretty much usable.
-
Install Docker
-
Install Docker-compose
- Fork this repository, clone it or just download a zip.
- Go to directory
- Start docker-compose with
docker-compose up
or withdocker-compose up -d
for detached mode. At the first time it can take a while, because docker will build two images, checkout svn repo and set everything up. Be patient and enjoy the log craziness. - After building process you'll have a subdirectory called
wordpress-svn
with WP code. DB credentials are automatically inserted insrc/wp-config.php
, so you don't need to worry about it. - Access
http://localhost/src
- To shut it down you can press
Ctrl+C
(if you've started it withdocker-compose up
) and/or rundocker-compose down
General steps for contributing to core are:
- Pick a ticket at WordPress Trac
- Make a patch that solves the problem
- Upload it at ticket's attachments section
Always run this before start working:
docker exec c_wpsvn svn up
wpsvn image will run this update everytime a container is created, but you can end up with an older version of WP files if you keep things running for some time without a refresh.
Run docker exec -it c_wpsvn_nodejs grunt patch:TICKET_NUMBER
Run docker exec c_wpsvn wp --version
Run docker exec c_wpsvn svn diff > TICKET_NUMBER.diff
If you get stuck with a ERROR: for c_wpsvn_db Cannot create container for service db: Conflict. The container name "/c_wpsvn_db" is already in use by container
try running docker rm -f $(docker ps -a -q)
Any feedback is welcome! Feel free to open an issue, send a PR or contact me at wp community slack.