There’s a lot going on as it relates to working with WordPress right now: People are discussing things ranging from dependency manage (via tools such as Composer) and talking about the up and coming REST API (which is really exciting).
I’ve also recently read that the object-oriented programming approach is just now making its way to WordPress development. Personally, I don’t fully agree with that, but I do think that there are some advanced topics that are making there way over such as inversion of control, dependency injection containers, and so on.
All of those are important things to be discussed, shared, and taught to others, for sure. But sometimes, I think that we forget that there are some basic things about WordPress that those who are just getting involved need to learn before getting into those topics.
These things include how to grab a copy of the latest version of WordPress from the trunk (let alone explaining what “trunk” – or source control – even is), how to get started with working on your first set of issues, and so on.
This is something that I think those involved in WordPress development could do a better job of teaching. To be clear, I think some do a fantastic job. Some are also very quiet – and that’s fine, not everyone cares to blog and many people are heads down on important work.
But as much as we want people to be involved in open source, I think we should make sure people are educated as well as possible to get involved and have a clear understanding of what to do.
Opting not to share information doesn’t mean you’re greedy; however, as I’ve been thinking about the wide range of topics that exist for those who are trying to get involved in WordPress or who are looking to up their game as it relates to object-oriented programming, I thought it might be worth sharing some shorter articles on how to get started with some of these topics.
WordPress and Subversion
If you’re an advanced developer, then the remainder of this article isn’t for you; however, if you’re someone who’s looking to learn how to get started with checking out the latest version of WordPress before the final release so that you can play around with it, explore new features, test them, find and/or patch bugs, then this post is geared towards you.
The Software
In order to get started, you need to have some familiarity with Subversion which is source control software. Some developers opt to use the command line interface, others use tools such as TortoiseSVN, Versions, or Cornerstone.
For the purposes of this article, I’ll be using Cornerstone.
Setting Up The Installation
As with any local installation of WordPress, you’ll need to create a directory that’s setup such that your web server sees it so that you can access it via a web browser.
In short, you’re going to be setting up a version of WordPress just like you would any new release except you won’t be downloading it from the WordPress.org homepage.
Checking Out The Source Code
Instead, you’ll be grabbing a copy of it from the Subversion repository. To do this, you’ll need the following address:
https://core.svn.wordpress.org/trunk/
Using that address, load your favorite client of choice (mine being Cornerstone), and fill out the proper fields:
Notice that the only fields we will out correspond to the address components of the path specified above. Since this is open source software, you don’t need credentials to checkout the source code.
From here, you’ll then need to issue the “checkout” command. This will be implemented differently on your application (or in the command line). In Cornerstone, when you click on (or highlight) the repository in the “Repositories” pane, you’ll see the “Checkout” button become available in the top toolbar.
Next, choose the directory on your file system in which you want the files to be downloaded. Remember, this needs to be the directory that you created earlier so that your web server is able to load it and so that you’re able to connect the application to your database.
What Now?
At this point, you should have a fully working version of WordPress installed on your local machine. Remember that this version is considered a development version and shouldn’t be used for your client projects.
Instead, treat it as a way to test the new features of WordPress, evaluate and fix bugs, then apply patches.
If you’re interested in reading more about this in a bit more depth, check out this article in the Codex. Also feel free to leave any questions or additional things that I missed in the comments.
It’s Not Just For Mac
I realize that in this post, I’ve walked through how to check out the latest copy of WordPress using tools on a Mac; however, I’ve tried to make sure that I’ve provided the relevant addresses and what not so that you can plug them into your Subversion front-end of choice (or the command line, if that’s what works for you).
Anyway, the advantage to being able to have the most recent copy of WordPress on your machine is not only so that you can see what’s coming down the pipe, but what’s available for testing, patching, reporting bugs, and so on.
Of course, that’s content for another post which I hope to cover at some point in the future.
Leave a Reply
You must be logged in to post a comment.