Smart Practice for Wordpress Theme Development

Apr 18th, 07 | 3 remarks

There are a number of ways to create and test themes for Wordpress, but one of the most efficient methods is by way of setting up a test server on your local machine. Because installing an Apache server can be a convoluted process however, many designers resort to alternative means of testing themes. One way is to create a separate folder within their file structure for installation of a second Wordpress blog, then connect to the primary database. When I tried that, I ended up with a big headache. Alternatively, you could use the sandbox method, which is also very popular.

I decided to go for XAMPP intead. With it, you can easily be up and running with your own local test server within minutes. XAMPP is freeware, and installs everything you need - Apache, mySQL, and PHP.1

xampp1.jpg

Once you have XAMPP installed, create a folder in the C:\Program Files\xampp\htdocs\ directory for your test site and call it whatever you want. Specify your test server, just as you would a remote server. This will probably be C:\Program Files\xampp\apache\bin. Finally, specify the site root using the name you decided on, for example C:\Program Files\xampp\htdocs\themedev. Dreamweaver makes short order of these setup tasks with an extremely simple UI.

Now open your browser and go to http://localhost. You’ll see a default page served from your own machine, with links to services you can use to set up your database. If you want, Dreamweaver can synchronize your site with your test server, and by using the “Preview in Browser” (F12) command, it’ll bring up the browser of your choice with the URL you designated (http://localhost/themedev). Of course, you’ll have to have Wordpress installed in this directory before it will work. Now you can build/modify your themes, and preview them on your own machine before pushing them to production, saving you time and bandwidth.

I’ve been tinkering around with theme development for quite a while, and going about it all wrong… making changes, uploading and holding my breath while I waited to see if everything loaded correctly. I broke things a lot. :) Even with a second database for testing, testing and debugging in this way was so slow. Don’t risk wrecking your production installations. Give XAMPP a gander.

1 Although XAMPP is available on multiple platforms, this article assumes you’re using Windows as your computing solution.


  1. freelance.1freelance

    [...] bang-up site now mention this talk http://designadaptations.com/notebook/smart-practice-for-developing-wordpress-themes/ and give comments [...] freelance.1freelance freelance photographer Subscribe to [...]


  2. Installing a Local Wordpress Blog | Design Adaptations

    [...] couple days ago I wrote about how to set up a local testing ground for Wordpress theming using XAMPP, but what about setting up your blog itself to run locally? With just a few clicks in [...]


  3. Steve

    Well done. Now for something simpler. ThemeDreamer is lightweight, TINY plugin for Dreamweaver that acts as a ‘data translator’ (a special class of plugins that do more then just create a toolbar for snippets). In short, it ‘translates’ wordpress template tags into a dummy post in realtime. What does that buy you? It makes visualizing CSS easy. It also takes it one step further by emulating the actual parameters that you pass template tags so that the effects can be seen visually. It makes navigating code in Split View (Design View/Code View) a snap, so you can “see what template tags do what” just by clicking. Design View isn’t meant to be perfect (not by a long shot) but it does give you enough feedback to visualize fonts and cut out alot of guess work. This is just a few highlights in ThemeDreamer’s arsonal along with code hints, context sensitive definitions for template tags, etc.

Post your remark

Other Recent Articles

In Reviews »

Clever Development With Coda

07/15/08
If you follow design related blogs, it seems you can't click a mouse anymore without Coda's icon making an appearance. I heard about this software long before buying my Mac, but because it's exclusive to that platform, I was never able to give it a test run. Now eight ... [ » ]

In Inspiration »

Have You Ever?

06/25/08
If you know me very well, you know how important music is in my life. It's playing at all times in my house, and I embrace all kinds of genres. I don't talk about it much on this blog, but I should. Music and creativity, in my opinion, are inextricably ... [ » ]

In Design »

The Evolution of a Logo (I Can Live With)

06/19/08
One of the most frustrating things for me since I started writing on this blog was the lack of a logo I really loved. That's not to say I haven't tried. But logo design, to me, is kind of a thing all it's own and I'm just not very good ... [ » ]