views:

55

answers:

1

What's the most effective way to streamline WordPress theme development when moving from a dev to a production environment?

A: 

First off don't use category ID numbers you should tie everything to category or tag slug since you can easily duplicate the slug when creating the new category.

        <?php // excludes testimonial category
        $slug = "testimonial";
        $category = get_category_by_slug($slug);
        query_posts($query_string . '&cat=-' .$category->cat_ID);
    ?>

Remove the - on cat to include a category by slug. After that I just FTP/SCP the theme up. You may want to look into getting a beanstalk account which does deployment for you with subversion and git deployment is coming.

http://beanstalkapp.com/

curtismchale
Thanks for mentioning beanstalk's deployment feature! I didn't know they had such a thing. When you're using SVN, do you store the whole WP instance or just the theme? What's your approach for managing the database differences between dev and production?
Jon Lebensold
I just keep the wp-content folder excluding the uploads folder, which means I get the themes and all the plugins.Regarding DB i don't make sure that they are exactly the same. I just make sure that I have some content that matches in each DB. So that they all have some posts. If there is a category that has some special function I just add a few items into it manually.
curtismchale