Getting our Theme Tweaking Workshop Ready

Blog Theme Workshop

One thing I’ve learned over the years it is get the proper tools to do the job right. Setting up a good workshop for Tweaking Themes is a great idea and worth the investment in time to setup. If your blog is a business blog you especially want to take this step to assure you aren’t in danger flowing away your blog while making changes to it. The workshop is safe. You can make changes, corrections, additions and if you accidentally blow up the blog all you have to do is clear a little smoke and start over. Now let’s look at some tools and process we want available to us in the shop.

Creating a test database from your live site

Another thing I’ve learned about picking a new theme you can’t go by the demo site to determine how a theme is going to function in the blogosphere.

I can’t tell you how many themes I’ve looked at in Demo and thought they looked pretty good only to try and test install them and find they won’t work in the real world. I tried a new magazine style theme last week that was getting a lot of good reviews. When I installed the theme I found out it worked fine as long as you had not title longer than 30 characters and no categories with more than 20. Anything longer than that, it was a mess. As long as blog posts had small images and were not longer than 100 words it worked pretty well, but the formatting broke horribly unless kept in those very narrow parameters. You want a robust theme, A well tested theme, A theme that has been really run through its paces and found to be stable.

The best way to do this is to copy your existing blog database to a new database and setup your testing workshop based on that database. It will be just like your live blog to that point. When you install the test copy of WordPress you will set the wp-config.php file to the copy database.

How Do I Make a Copy of My Database

This one is easy. I’ve already written about this process in a post on upgrading from an early version of MYSQL to a newer version. Follow the steps in that post and you have created your test database. Restore your WordPress Database From Mysql 4 to Mysql 5

Avoiding Duplicate Content

I figure someone is already to jump on the Duplicate Content issue. I don’t think it is an issue, but to keep it from being a non-issue do this:

When you install wordpress it asks if you want to keep this blog private or share it with the search engines. Have you ever thought that a strange question? Why in the world would I want to hid my blog from the search engines? Now you know. Choose that option and your test blog is never going to create a duplicate content issue.

Creating a test blog site for tweaking your theme

I always have a test blog setup where I can try out new themes and see how they look. All you have to do is create a directory on your host site and copy the WordPress files to it. put the wp-config file in that directory which points to your test database.

If you use the custom permalink structure which I recommend /%category%/%postname%/ you should set that up as soon as you go live with the blog. One thing to be aware of when using this permalink structure on a directory which is under another blog. It might take a while for the DSN to get it figured out this is not associated with the parent directory it is a blog of its own. This is not an issue if you have a domain name you set this up under. But, if setting it up under an existing blog url it might look a little strange for a few hours. Because of this I will often do the install and set the permalink structure as the last thing at night then start working on the new site in the morning.

It is never a good idea to be tweaking a blog that is live. Yes, you can do it, but at your own peril. As mentioned above it is easy to use a test database as well for this site. You will get a better picture of how your exact content is going to look inside the skin of this new theme.

CSS Where the Magic Happens

A good quick reference to CSS would be another handy tool to have in your workshop. Almost every theme requires some CSS Tweaking and have a handy guide to syntax makes the process easier. CSS is where the magic happens.

A Little PHP for Seasoning

The only PHP I know comes from studying theme code in existing themes. It might be a good idea to have a quick reference to PHP syntax as well if you are uncomfortable with making changes to the code. Since I always have a copy of theme I’ve uploaded if I blow away one of the PHP files I simply FTP the original file up to the site again.

One final note associated with the workshop and best practices. Create an empty theme directory on your PC as you make changes to the various files FTP those files back to your PC. I can’t tell you how many times I get to working away, making changes, loving the results and make one final little tweak and blow up the file. And I only had the original file to restore. ALL my changes were gone. Now when I get a file looking like I want it to, even if it isn’t done yet I will back it up to my PC so I can restore it and don’t have to start from scratch again.

Finally, I have no idea who’s workshop is pictured above, but it doesn’t look like much work gets done there, mostly stuff gets stored and stacked for possibly future work. Yeah, Okay, it’s my workshop and so far this year all I’ve done is take a picture of it. As soon as the summer heat is over I’ve got to get that cleaned up. Wait, I think I said that last year. . .


  1. Great WordPress tips, there is a lot of little things that people can know about these sites that can make them so much more powerful

  2. Great info Dave.

    Two questions…

    1. Why don’t you just do an export out of the live site and and import into the test site using the WP admin?

    2. I set up a test site and the URL looks like: http://www(dot)myfamilysite(dot)com/mnirea
    (not the actual URL, but you get the point). It ultimately will be www(dot)mnirea(dot)com. Since I am moving hosts, I will simply swing the DNS over to this location once I am ready to go live. Will everything (posts, images, permalinks) be broken by the new URL structure?

  3. Scott,

    1. If you are on the same version of MYSQL and the same version of WP that should work. I’ve actually never used it. I’ve tried the import links to the blogroll before and it never worked. Anytime I’ve been doing this process I’ve been going from an early version of either WP or MYSQL.

    Using the method I describe in the post works for all situations. I’ll have to try the import export routine.

    2. Not sure I follow all of that, but it looks like the question is will my links be broken. YES they will be broken and you should put in 301 redirect code in your htaccess file to handle this till everything is reset to the new location.

  4. Great post Dave.

    Quick question.

    If I wanted to take a class to work on WP, would these classes work? www.

    I’d like to work on my own WP sites and be half good at it.

  5. Matt,

    I would recommend you start with the book “WordPress Theme Design” by Tessa Blakeley Silver.

    At the same time, start downloading interesting themes and study their design and css styles.

  6. Will do, thanks Dave.