Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to move "r_site_dir" variable to syncdb_config #12

Open
henscu opened this issue Sep 8, 2014 · 1 comment
Open

Request to move "r_site_dir" variable to syncdb_config #12

henscu opened this issue Sep 8, 2014 · 1 comment

Comments

@henscu
Copy link

henscu commented Sep 8, 2014

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

@attackant
Copy link

I'm having a similar problem but will open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants