Kevin Haag Kevin Haag - 3 years ago 109
PHP Question

Running Wordpress on localhost, want to make it live on Windows Server 2003

Okay, so I have a client that is insisting that I install Wordpress on their in-house server that is running Windows Server 2003 SP2.

What I've done so far is installed mySQL, PHP, and Wordpress into the publicly accessible directory (ie. brings up the website).

Obviously, if I'm on the server and navigate to

it brings up the working Wordpress site, but what I'm trying to do is change it so that when you navigate to
it will bring up the site correctly. Currently if you do this, it will bring up the site without any styling or images, because instead of the paths pointing to
it points to

Please help me, I've searched everywhere for a solution, but I can't find anything about keeping it on your own server, just moving to another server.

Answer Source

You have to search/replace in the rest of the database to change all URLs for posts, URLs in content and in meta. Use these queries in phpmyadmin (except for the first one if you have manually changed the site URLs or did so in admin):

UPDATE wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, '','');

UPDATE wp_posts SET post_content = replace(post_content, '', '');

UPDATE wp_postmeta SET meta_value = replace(meta_value, '', '');

Edit 10/21/16

It's much better to use this PHP script to change URLs, as it correctly handles serialized data in the database; the SQL queries above will break serialized data, and you may loose theme and widget options. See

And then also look for hardcoded URLs in style sheets and the theme's functions.php file.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download