You've probably seen that the new Twenty Thirteen theme's draft is now in WordPress core, which is pretty exciting. But what if you want to install it on a site that is running the latest stable version of WordPress (3.5.1), not from an SVN of WordPress Trunk? Let me show you how.
First, I should point out that you will still need to use SVN, but only for the theme itself. WordPress will still be running whatever version you currently have installed (which, of course, would be the latest, right? ...right!)
Second, I will be explaining how to do this on a Mac. The same principals can be applied to Windows and Linux-based systems, but the specific software used may change. I believe you'll have enough information from this walkthrough to get you through on any operating system.
Now, down to business. There are two ways to achieve this:
Method 1: Using a GUI (SourceTree)
The simplest way to do it without needing to get your hands dirty with the command-line or SSH, etc. is to download the theme's source code, ZIP it up, and then install it through the WordPress dashboard.
I'm going to use the free SourceTree app, so grab yourself a copy of that first.
Fire up SourceTree and click on the big "Clone Repository" button, where you'll be prompted to enter the details for the repository.
The secret sauce is knowing where to find the theme. If you're unfamiliar with SVN, you may not have realised you can check out just a sub-folder of a repository! Which is what we're about to do. You can actually browse the WordPress repository in your web browser. If you browse through to wp-content/themes/twentythirteen, you'll find yourself here: http://core.svn.wordpress.org/trunk/wp-content/themes/twentythirteen/
This is the URL to paste into the "Source Path / URL" field in SourceTree. Also, take note of the number beside "Revision", we'l need this too.
Once you've pasted the URL in, set your destination path. In this case, I'm using /Users/japheth/twentythirteen, and it's important that you keep the twentythirteen part the same.
You should also set the local repository type to "Git", and the "Convert from SVN revision" should be the number we noted earlier. At the time of writing this tutorial, that was 23460. You should use the number you see, as it will indicate the most up-to-date version of Twenty Thirteen.
Once you click "Clone", SourceTree will say it's cloning. Wait til it's done, the progress bar will be full, and you can click the "Close" button.
Congratulations, you have the theme! So go to the directory, right-click it, and choose 'Compress "twentythirteen"'. This will create a twentythirteen.zip file for you.
Now you can log into your WordPress admin and go to the "Install Themes" screen, find your zip file, and install the theme. Activate it, and job done!
Method 2: From the Command-Line
If you're happy to get your hands dirty on the command-line, it's actually even simpler.
Open up your Terminal, and navigate to your WordPress installation's directory. Now, with a command like the following, navigate to the themes directory:
Once you're there, run the SVN checkout command using the same URL we used in Method 1, like so:
svn checkout http://core.svn.wordpress.org/trunk/wp-content/themes/twentythirteen/ ./twentythirteen/
This will create the relevant new theme directory, and pull the theme from the SVN repository, into the directory.
Now you have the theme. Just go into your WordPress admin and activate it, and that's that!
svn upto update the theme to the latest version at any time.
They're both pretty simple ways to install the theme, depending what tools you're comfortable with. So, now you have the Twenty Thirteen theme installed for yourself, what are you planning to do with it?
Let us know in the comments how you'd like to customise Twenty Thirteen.
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.Update me weekly
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post