Creating a Simple WordPress Theme


Posted by: TomS on March 28, 2010 @ 5:39 pm

Packaging and Deploying My Theme

Once my theme was completed, I needed to get it off of my test site and onto my production web site.  This process is fairly straightforward, but I’ll document my steps here for completeness.  The steps I follow are as follows

  1. SVN Export: I keep my theme under version control in SVN.  My first step is to export my version controlled theme to a temporary folder.
  2. Package the Theme: I then package up the theme using tar.
  3. Transfer the Theme: Once the theme is packaged into a single file, I SCP it over to my production server and unarchive it.  You could also use the WordPress administration tools to upload the theme.
  4. Activate the Theme: After the theme is placed in the correct folder on my production web server, I activate it using the WordPress administration tools.

Sample commands for steps 1-3 are as follows:

#Step 1: Export the SVN content to a temp directory
svn export http://server.my.home/svn/repos/hackrunner/trunk/theme hackrunner

#Step 2: package up the directory in a tar file
tar -cvf  hackrunner.theme.tar hackrunner/

#Step 3: Send it to production server
scp hackrunner.theme.tar me@hackrunner.com:.

# then on production server
# change to themes directory of the blog site ... directory names may vary
cd /var/www/hackrunner.com/wp-content/themes/
#unzip the theme
tar -xvf hackrunner.theme.tar

Once the theme was uploaded, it was straightforward to go in and activate my theme on my production site.

I’ve included snapshots of my theme for reference below
hackrunner.theme.tar
hackrunner.theme.zip



One Response to “Creating a Simple WordPress Theme”

  1. [...] a previous post, I covered creating a simple WordPress theme, which forms the basis for the theme I use on this site.  That theme creation guide covered only [...]

Leave a Reply