How to change the theme programmatically?
You can install drush on your system and then from drush command you can change the theme using 

drush vset theme_default &lt;theme_name&gt;


You can do the changes from database also. Either on the commandline, or via an administration interface (eg PHPMyAdmin) enter the following query

UPDATE system SET status=1 WHERE name = '&lt;theme_name&gt;';


Then either:

UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';
TRUNCATE cache;
TRUNCATE cache_bootstrap;
TRUNCATE cache_block;


Source: https://drupal.org/node/200774