Upgrading a Customized WordPress Theme
Problem:
You’re using a third party wordpress theme but have made changes to customize it for your own needs (changed a picture, added advertising, etc.). When the third party releases an upgrade to the theme you’d like to upgrade but don’t want to lose your changes.
Solution:
Let your version management system move your changes over to the new version for you. I use Subversion, but any modern VMS should do fine as well. Here’s the steps I use to upgrade from, let’s say Cool Theme 1.0 (that contain my changes) to Cool Theme 1.1.
- Import the original version of Cool Theme 1.0 (without my changes) to Subversion. I use a repository path like /reposroot/cooltheme/trunk.
- Create a tag to freeze the 1.0-version. In Subversion you just copy the above directory, I name the new directory something like /reposroot/cooltheme/tags/1_0.
- Create a branch from the 1_0 tag. I’d name the branch /reposroot/cooltheme/branches/r1_0.
- Checkout the r1_0 branch to a local working directory.
- Copy the files of the updated version of Cool Theme, the one that contain your changes, to your working directory.
- Check in. Now you have the current version in the r1_0 branch.
- Delete the working copy if you like, it has served it’s purpose and the time has come for the actual upgrade.
- Checkout the trunk branch (reposroot/cooltheme/trunk in my example) to a working directory.
- Copy the files of the upgraded theme to the working directory.
- Check in the changes.
- Once again, delete the working copy if you wish.
- Create a tag for the new version (reposroot/cooltheme/tags/1_1 for example).
- Create a branch for the new release (copy the 1_1 tag to reposroot/cooltheme/branches/r1_1)
- Merge the changes between r1_0 and r1_1
- Handle conflicts
- Check in.
- Voila! You should now have an upgraded version with your changes in the new release branch (reposroot/cooltheme/branches/r1_1)
No comments yet.