I was watching Mark Jaquith's presentation at WCSF 2013 recently and in the Q&A Mark mentioned something about rsync - after a quick Google I can see this is done via SSH - my question is this: is this something that can be done to a local development environment? Do you still need to copy the database and change configuration, url references etc? For a local setup should I just stick to using a script to change the references?


If you have databases reachable from the outside ie: mysql1.example.com you can work on a local development environment connected to that the whole time.

I just found a nice thing to put in wp-config.php to be able to change the host depending on your environment

$host = $_SERVER['HTTP_HOST'];
define( 'WP_HOME', 'http://' . $host );
define( 'WP_SITEURL', 'http://' . $host );

Then there are setups like:

| improve this answer | |
  • How do I find out if the database is reachable outside? Is this the same as remote access? – erichmond Jul 30 '13 at 12:55
  • Are you using a shared hosting? – Pontus Abrahamsson Jul 30 '13 at 13:01
  • I use both shared and VPS – erichmond Jul 30 '13 at 13:09
  • Okey, for shared hosting it depends if they have mysql on other servers, you can see in your wp-config.php if it points to localhost or some other server. You can setup remote access as you wrote before on your VPS, like this: cyberciti.biz/tips/… and add your public ip from where you are working so its secure. Another way can be to add vpn-tunnle to the server. – Pontus Abrahamsson Jul 30 '13 at 13:13
  • Thanks I'll check this out. For VPS it looks pretty simple but I guess it's a little more difficult for shared - all my shared are pointing to localhost – erichmond Jul 30 '13 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.