How to change theme programmatically from a external application?

I have a one-click WordPress install as part of my services. After install I want to show my clients a set of themes so they can choose one and their pages will start working without any configuration needed. The problem is I need to know how to change the theme from an external (PHP) application, perhaps accessing directly to the database or to one of the installation files.

Related posts

Leave a Reply

1 comment

  1. Take a look at the options table:

    $opt_table = "{$GLOBALS['wpdb']->prefix}_options";
    $parent_theme = $opt_table + template;
    $child_theme = $opt_table + stylesheet;