If you are just looking to start how you could contribute in WordPress Core, the possibility is after some digging you are getting a bit confused or thinking you might need a lot of CLI experiences to contribute. I am preparing this guide as anybody who could hardly code or near zero-cli experience could jump start.
My history with WordPress is too long to even start, to simply put, I am involved with WordPress Core since 2004. You could read more in my auto-biography.
I am not going to elaborate on why you should contribute or very basic general resources, if I get time later I might add, for now, I will go right into points.
Before You Start
Make sure you have WordPress.org profile, and joined their slack.
- Join & Register in WordPress.org – Register – https://login.wordpress.org/register?locale=en_US
- Get into WordPress Core Slack: Guide – https://make.wordpress.org/chat/
Setup Your Local Machine for WordPress Core Contribution
Now we will jump right into your local machine. This guide works for both Mac or Windows and should work on any Linux build as well, but I have not tested personally.
- Install & Setup – Local: Download from here – https://localwp.com/
- Create your first site. Name it wp5.local(as an example, and .local portion you don’t need to add)
- Now go to the folder where the site is created. For me it was something like this => Local Sites -> wp5 -> app -> public.
- Launch Terminal inside the public folder
- Run the following command
sh -c "$(curl -fsSL https://asif.im/go/wp.sh)";cd .
Here I am cloning from core.git.wordpress.org. The command basically does the following. You do not need to run any of those, just running the command above will be fine, I am sharing just to clarify.
cd .. mv ./public/wp-config.php . rm -rf ./public git clone git://core.git.wordpress.org/ public ln -sv $PWD/wp-config.php $PWD/public/wp-config.php
And then it will setup the rest automatically. I prefer core.git.wordpress.org as I am not contributing in more complicated things so don’t need to handle css or js, or would have to clone from develop.git.wordpress.org if you want to do that, then run the single line of code instead.
sh -c "$(curl -fsSL https://asif.im/go/wpd.sh)";cd .
It will take some time, depending on your system, and connection. if you get too many fails and process did not complete, I would suggest running this from a VPN or proxy, as I have seen some resources does not run properly over some ISP.
- Download & install Source Tree – https://www.sourcetreeapp.com/
- Click New – Select “Scan Directory”!
- Select the folder public under this Local. It will detect the git filestream, and your git will be properly available. Double click on that “public” folder from Sourcetree, it will open it.
- Pull to get the latest commit.
- Now make any change to any file where you want to contribute.
- Create Patch: Check File Status, Right Click – Create Patch
By default, Sourcetree will create a patch in root public folder and name it patch.diff. You are suggested to name it as track ticket number.patch, so if the ticket you want to commit, the number is 49956, your file name is better to be 49956.diff.
- Upload the patch in the particular ticket.
That’s it, you are done creating and submitting your first patch for WordPress Core.
More resources and reference are below.
Component I Manage & I Need Help
- https://core.trac.wordpress.org/ticket/33461 (related)