WordCamp Philly: WordPress & Version Control

Dave Konopa talked about how to get con­trol of Word­Press with ver­sion con­trol in the sec­ond ses­sion at Word­Camp Philly. Ver­sion con­trol gives you a safety net you can step back to at any time. It allows you to man­age dif­fer­ent streams of devel­op­ment work. This lets you simul­ta­ne­ously develop new fea­tures while still patch­ing exist­ing bugs.

By cre­at­ing a doc­u­mented his­tory of code changes it makes syn­chro­niza­tion and col­lab­o­ra­tion much eas­ier. It all requires com­mit­ment, though. You need to do it every day so that you don’t end up with a hap­haz­ard project.

The two big options: sub­ver­sion and git. Sub­ver­sion is a cen­tral­ized repos­i­tory sys­tem while git is a dis­trib­uted ver­sion con­trol tool.

With git, when you’re ready to share you code you can push all your changes to a remote repos­i­tory. You can clone a repos­i­tory and also cre­ate a stag­ing area for inter­me­di­ate work.

The eas­i­est imple­men­ta­tion of ver­sion con­trol for Word­Press is cus­tom plu­g­ins and themes. While you could use ver­sion con­trol to man­age your entire site it’s prob­a­bly more than you need unless you’re work­ing on a sig­nif­i­cantly large site.

If you’re a git fan but want to stay up on the recent changes to the Word­Press code base it’s all mir­ror through a Github repos­i­tory that Mark Jaquith set up. It’s synced every 30 min­utes so you can keep up with any­thing that’s com­ing down the pipe.

Dave’s last bit of advice was to learn by try­ing. The best way to learn how to use ver­sion con­trol effec­tively is to use it. Get a plu­gin up on Github, exper­i­ment with things, and have fun. The slides from the talk are all avail­able on Github.