I just do this with a simple IF / SWITCH statement, checking the server name then changing the constant's for each of the environments http://www.paulund.co.uk/multi-environment-wordpress-wp-config-php