I've got a cool little hack in my wp-config (and some additional checks in index.php, and minor options settings in my local SQL wp_options table) to differentiate between my local WP and my net-hosted WP.
In config, I do the following:
// ** MySQL settings **
define('DB_NAME', 'db'); // The name of the database
define('DB_USER', 'usr'); // Your MySQL username
define('DB_PASSWORD', 'pw'); // ...and password
// CDN customization -- allows full uploading of files, but local runtime settings.
if ($_SERVER['SERVER_NAME']=='your.apache.servername' /*|| $_SERVER['SERVER_ADDR' ='127.0.0.1'*/) // test for your local test apache server...
define('DB_HOST', 'localhost:');
else
define('DB_HOST', '128.121.4.19');
That's a great approach to start with.
Then, make sure that your apache server name variable is set to match, and that your local db wp_options has all the site-url fields pointing to something local rather than your remote WP install. For instance, I have a dyndns.org domain name set up, so I set that in all my site urls in my local wp_options, so that I can do pretty much everything (other than admin stuff) locally right now, then just ftp everything to the net and it works.
Note that in config, I also do:
$on_test_server = ($server=='localhost:');
... which I can then test inside index.php for what to specially display when I'm testing here. For example, instead of calling/echoing my statcounter tracking, I just echo "CHAITGEAR @ HOME". I also change the page title to say "@ HOME" in it, so I can quickly see from the window titlebar which version I'm working with. Grab my index.php off of http://www.chait.net if you want to see exact usage.
=d