And don’t I need to change the values for WP_HOME and WP_SITEURL?
If you do what most people do and run there site as “localhost”, then yes you have to change them, and also change lots of other database entries which specify images etc. BUT do NOT do this.
What I strongly advise you to do is to configure your locally served website to use “VirtualHost” settings.
Details here:
http://httpd.apache.org/docs/2.2/vhosts/name-based.html
And put your domain name into your “hosts” file, details here:
http://en.wikipedia.org/wiki/Hosts_%28file%29
Then you can turn off the selection of the live website and your local copy by a simple edit of your hosts file.
This way your website never knows that it has moved.
Thanks RossMitchell
I think I do have VHost set up, I followed these instructions instead:
http://foundationphp.com/tutorials/vhosts_mamp.php
and I see some of the steps match those in the links you provided.
Can you please clarify this sentence
Then you can turn off the selection of the live website and your local copy by a simple edit of your hosts file.
Where would I turn of selection of the live site? That one is not hosted locally, it’s hosted on Dreamhost.
Are you suggesting that the local domain should name match the live site domain?
Are the changes I did on the wp-config.php file still necessary?
thanks 🙂 – as I said I’m pretty confused about this new section of WordPress development
Elena
Where would I turn of selection of the live site? That one is not hosted locally, it’s hosted on Dreamhost.
What happens is that BEFORE a name is given to the internet DNS system to be mapped to an IP address, the name is first looked up in your HOSTS file. Editing the hosts file and making the line(s) for your local testing website into comments (prefix of “#” or is it “;” ? will mask the local lookup. When you want to test locally again, “uncomment” the lines. My entries are like:
mysite.com.au 127.0.0.1
www.mysite.com.au 127.0.0.1
Are you suggesting that the local domain should name match the live site domain?
Yes, exactly the same, then you don’t need to change ANYTHING in te database.
Are the changes I did on the wp-config.php file still necessary?
Yes, the database name, user name and password etc have to match what is in your local mysql database server.
Of course if you want to you can create the database and everything to have the same names but I don’t find it worth the trouble. It is also helpful to be able to tell which database is which from the name.
Thank you so much!
I’ll give that a try early next week and update here when I’m done.
Elena