All WordPress.com code is managed using the Subversion revision control system. Subversion (SVN) is the only way to access and update code on VIP Hosting.
Accessing SVN #
After your your theme has been reviewed, you will be able to use your WordPress.com username and password to access the code for your theme using subversion. The subversion repository URL will be specific to your site and sent to you by email from the VIP Hosting team.
Initially, you will just have read access to your theme’s SVN repository. Once, you’ve identified your familiarity with SVN, and the quality of your changes, we’ll provide write access. Until you have write access, please provide patches (
svn diff) by email with any additional files included in a zip.
All code development and testing should be done in your own local WordPress.org environment. Only tested code should be committed to WordPress.com.
Submitting Code #
Our aim is to have all developers have write access to their own repositories, but all new-to-VIP project developers will have to send in code changes via support ticket. To submit code via support ticket, we ask that you create a diff of the changes so only the changed code is sent.
Here’s information about how to save a patch/.diff file. If you have questions about this, please let us know.
Committing Code #
Once you’ve proven your skill, attention to detail, and willingness to apply feedback, we’ll give you write access to your VIP repositories. This gives you the ability to commit your code directly. Once you do, it is spot reviewed for security and performance concerns, and then deployed to server clusters in all of our data centers. Code changes are usually deployed within a few hours during US business hours, but usually much faster (within an hour).
For your benefit, we take code quality, security, and performance very seriously. Please check with us before committing very complicated or large chunks of code. If in doubt, it’s best to check with us first. It’s a lot less work for everyone (including you) if we’re able to take a look at it before committing than having to revert the change later. We also greatly appreciate if you commit often and with each functionality as a separate commit (if possible) rather than waiting and pushing a bunch of code to us all at once. It makes the code easier to review if we’re reviewing things in chunks.
We also like to review all plugins prior to committing them to your VIP repo. We have reviewed a small, but growing list of plugins, and modified some of them to make them more stable, secure, and perform better. Since these plugins have been pre-approved, we would prefer you use these plugins if possible if you need functionality similar to what they provide. Please see the Plugin Review Process if a solution isn’t yet available.
A few other notes:
- When writing commit messages, consider your audience: those reviewing your code and those debugging your code at a later date.
- For the first purpose, commit messages are one to many, asynchronous and textual. Try to write the commit message like an email. The first line should be a descriptive subject. The next line should be blank (as a separator). Then comes the body of the message.
- For the second purpose, you’re explaining why the change was made. The commit message should say what the problem was (repro steps?), how you fixed it (briefly – the code itself gives more details), and why you changed what you did. This way the shiny pants people of the future have the information they need to decide if they can safely change your code.
- At VIP → Dashboard (
/wp-admin/admin.php?page=vip-dashboard), you can see the current deploy status.
- If you’ve committed code you’re not happy with and would like to revert, you can do so from your local checkout. Simply use the command “
svn merge -c-64320 .” where “64320″ would be the revision you’d like reverted. After running that command, you’ll need to commit your revert. You’ll want to use a commit message similar to “Reverted r64320 because [explain your reasoning]“.
Access for Additional Developers #
For the security of your site and our systems, we like to have all of the following info for anyone with SVN access:
- Full Name
- WordPress.com username (should be their name or a handle, but not generic/brand)
- Alternate Email
- Job Title (role)
- Phone #
- Mobile #, as well if possible
- IM and/or Skype
In your VIP dashboard, you can request access for users added to your blog using the “Request SVN Access” widget shown below.