SyncDB
SyncDB copied to clipboard
Request to move "r_site_dir" variable to syncdb_config
I am following Mark Jaquith's full WP-Skeleton based workflow as described in his 2011 Wordcamp SF address:
http://2011.sf.wordcamp.org/session/scaling-servers-and-deploys-oh-my/
This involves deploying my WP-Skeleton based website using Capistrano as recommended by him.
The problem is that Capistrano creates the following directory structure on my shared host server ( symbolic links are indicated by "->" ) and it isn't completely compatible with syncDB:
├── public_html -> ~/deploy/current
└── deploy
├── current -> ~/deploy/releases/<latest>
├── releases
├── repo
└── shared/content/uploads
So to use syncdb-config I set the parameters as follows, which works for the rsync of my uploads directory:
r_web_dir = deploy
l_upload_dir = shared/content/uploads/
r_upload_dir = shared/content/uploads/
However for MySQL pull/push, syncdb cannot find wp-config.php based on the above parameters, as wp-config.php lives in ~/deploy/current and syncdb expects it to be in ~/deploy.
So, I need to update the parameter r_site_dir in syncdb to get it to work. I change the line:
r_site_dir=$HOME/$r_web_dir
to be:
r_site_dir=$HOME/$r_web_dir/current
This means I can't get automatic updates to syncdb as I need to hack it to get it to work, or I modifiy it each time I use it.
QUESTION
Would it be possible to move r_site_dir to be a parameter in syncdb_config?
The logic would be that r_site_dir only needs to be set initially by the user if wp-config.php is in a different directory to r_web_dir on the server.
Otherwise r_site_dir would default to $HOME/$r_web_dir as it does at the moment.
Thanks, Henry
I'm having a similar problem but will open a new issue.