database not responding on localhost

Yes, while convenient, let’s rule out the variable of using the $_SERVER['HTTP_HOST'] trick and put in the absolute URLs.

Here are some handy snippets I use when moving a site (you may want to use these to make sure everything is the same on your install):

UPDATE wp_posts SET guid = replace(guid, 'http://www.olddomain.com','http://www.newdomain.com');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.olddomain.com', 'http://www.newdomain.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.olddomain.com', 'http://www.newdomain.com');

UPDATE wp_options SET option_value = replace(option_value, 'http://www.olddomain.com', 'http://www.newdomain.com') WHERE option_name="home" OR option_name="siteurl";

tech