I have found this very frustrating as well. It seems like a flaw that wordpress writes the full url for images, etc. into the database, instead of a path relative to the root.
Here are a couple of sites that suggest ways of syncing local and remote sites. (I am still looking for something better.)
http://blog.namran.net/2009/06/07/automatic-backup-content-from-wordpress-to-another-mirror-site/
http://www.messaliberty.com/tag/wp-config/
hope this helps a little.
My workaround to that is to use the same domain names on my development setup, then just playing around with two copies of the hosts file by using a script to switch between the two for checking the live site and for working on the dev site.
Admittedly every now and then I forget to switch and things get confused for a moment. But it does make dumping the sql data easier.
Thread Starter
fhsm
(@fhsm)
Thanks for the tips.
I’m working w/ a multisite network that runs over SSL. Moving it to localhost isn’t going to be as easy as the dev/stage/deploy cycle of a drupal site. I’ve just had to set up a DNS server on my LAN. Hard to believe that’s really the easiest way around the problem but I think it is.
fhsm, could you please describe your dev cycle in detail, that would be very interesting, thanks!
Anybody tried one or both of these plugins:
Dev and Staging Environment Plugin
WP-Deploy
Would like to read about your experiences, as I am trying to build a sane wordpress dev and deployment environment… for me that means I want git as a backend, rsync or git push / pull mechanism for file sync across servers and database migrations – yes, I would like to UNDO any deployment step or change to different versions / tags easily.
I added some TAGS to this thread so more people can find it – you should always use tags here!
Have a nice day!