In order to make my wordpress site easier to deploy I have added the following code to wp-config.php:
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
It is my understanding that this should override any values stored in the database, but when I view source I see that wherever I have:
<?php bloginfo('template_directory'); ?>
…it is printing out the domain from the database value, rather than the one in wp-config.
Try setting the content dir for your plugins and themes
http://codex.wordpress.org/Editing_wp-config.php