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. www.domain.com brings up the website).
Obviously, if I’m on the server and navigate to http://localhost
it brings up the working WordPress site, but what I’m trying to do is change it so that when you navigate to http://domain.com
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 http://domain.com/page
it points to http://localhost/page
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.
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):
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 https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
And then also look for hardcoded URLs in style sheets and the theme’s functions.php file.
Go to
http://localhost/wp-admin/options-general.php
and change the WordPress Address URL and, if need be, the Site Address URL.That should help with retrieving the CSS.