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.

WordPress Core Contribute

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.

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.

  • 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.

https://make.wordpress.org/core/handbook/contribute/

https://deliciousbrains.com/developers-guide-contributing-wordpress-core/

https://github.com/metodiew/WordPress-Contribution/blob/master/WordPress%20Core%20Contribution%20Guide.md

Component I Manage & I Need Help

I am Maintainer for two components in WordPress Core, Permalinks & Export. I will list some ticket that needed some help.

Permalinks

  1. https://core.trac.wordpress.org/ticket/49871
  2. https://core.trac.wordpress.org/ticket/47912
  3. https://core.trac.wordpress.org/ticket/29669
  4. https://core.trac.wordpress.org/ticket/30784
  5. https://core.trac.wordpress.org/ticket/32903
  6. https://core.trac.wordpress.org/ticket/34542

Exports

  1. https://core.trac.wordpress.org/ticket/14584
  2. https://core.trac.wordpress.org/ticket/36340
  3. https://core.trac.wordpress.org/ticket/36339
  4. https://core.trac.wordpress.org/ticket/14757 
  5. https://core.trac.wordpress.org/ticket/33461 (related)

Others:

  1. https://core.trac.wordpress.org/ticket/49956 (Important Comment)
  2. https://core.trac.wordpress.org/ticket/36557 (My Ticket, needs test)
  3. https://core.trac.wordpress.org/ticket/36556 (My Ticket, need patch)

Leave a Reply

Your email address will not be published. Required fields are marked *