welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

Can't wordmove databsase, everything else does. #312

Closed faresite closed 7 years ago

faresite commented 8 years ago

Hello,

This is my first github issue (ever!) so apologies if I'm breaking any rules unintentionally.

I have seen the other similar issue here where the db doesn't move silently. I am having the same trouble.

I am using VVV as my local environment and deploying to my staging server on Siteground over ssh. Everything seems to work, I even managed to manually do the exact same mysqldump command on my staging env that wordmove executes (and it created the dump.sql file alright).

There doesn't seem to be any error really, wonder how can I solve this? Apart from that I'm loving wordmove.

When I do wordmove pull -d I get this log:

vagrant@vvv:/srv/www/Morgan/htdocs$ wordmove pull -d

▬▬ ✓ Using Movefile: ./Movefile ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬ ✓ Pulling Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    local | mysqldump --host=localhost --user=wp --password=wp --result-file="/srv/www/Morgan/htdocs/wp-content/local-backup-1464194134.sql" Morgan
/usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/deployer/base.rb:131: warning: Insecure world writable dir /usr/local/rvm/gems/ruby-2.3.0/bin in PATH, mode 042777
gzip --best --force "/srv/www/Morgan/htdocs/wp-content/local-backup-1464194134.sql"
    local | gzip --best --force "/srv/www/Morgan/htdocs/wp-content/local-backup-1464194134.sql"
   remote | mysqldump --host=localhost --port=3308 --user=[*hiding username*] --password=[*hiding password*] --result-file="/home/[*siteground user*]/staging/5/wp-content/dump.sql" [*siteground db name*]
gzip --best --force "/home/[*siteground user*]/staging/5/wp-content/dump.sql"
   remote | gzip --best --force "/home/[*siteground user*]/staging/5/wp-content/dump.sql"
   remote | get: /home/[*siteground user*]/staging/5/wp-content/dump.sql.gz /srv/www/Morgan/htdocs/wp-content/dump.sql.gz
   remote | delete: /home/[*siteground user*]/staging/5/wp-content/dump.sql.gz
gzip -d --force "/srv/www/Morgan/htdocs/wp-content/dump.sql.gz"
    local | gzip -d --force "/srv/www/Morgan/htdocs/wp-content/dump.sql.gz"
    local | adapt dump
    local | mysql --host=localhost --user=wp --password=wp --database=Morgan --execute="SET autocommit=0;SOURCE /srv/www/Morgan/htdocs/wp-content/dump.sql;COMMIT"
    local | delete: '/srv/www/Morgan/htdocs/wp-content/dump.sql'

Would you like me to attach a different log?

Thank you very much in advance, and I think your work is amazing! I use git for all my other projects, but it feels as if Wordmove would be the perfect workflow for my WordPress projects.

dezinerdudes commented 8 years ago

You will need to ssh into your vagrant machine first vagrant ssh Then change to root user sudo su - Install the wordmove gem inside your vagrant machine gem install wordmove Change to the project folder where you have set up your initial wordmove file cd /srv/www/projectfolder And try execute your wordmove commands again from inside vagrant.

alessandro-fazzi commented 8 years ago

It feels like the command was successful, and so it looks like Wordmove's setup is already in place...

@faresite 1 of all thanks for submitting an issue to the community. Your post is almost ok; in order to be all ok on the next issue just be sure to read this wiki entry https://github.com/welaika/wordmove/wiki/Contributor-Guide#bug-reporting :)

One question about your problem: are the wordpress db prefixes the same on both environments?

afrizen commented 7 years ago

What a difference. sudo gem install wordmove => nightmare. vs sudo su -; gem install wordmove => installed (finally)! Much thanks to @dezinerdudes for the tourniquet...