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

Database pushing not working #187

Closed essenmitsosse closed 8 years ago

essenmitsosse commented 9 years ago

Database pulling from my server works perfectly fine, but when I push to the server no changes in the database are made. I am not getting any error messages and the PHP Error Log is also empty. All I get is this, which looks perfectly fine:

▬▬ ✓ Pushing Database    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
   remote | write /wptest.betoniu.de/wp-content/dump.php
    local | download http://test.betoniu.de/wp-content/dump.php?shared_key=98bca8c7901f861904029ce198a42a5274db4a57d580cfec9eb736e9efc55f3c5a5e354d3ada226a > /srv/www/betoniu/htdocs/wp-content/remote-backup-1436722293.sql
   remote | delete: /wptest.betoniu.de/wp-content/dump.php
    local | mysqldump --host=localhost --user=wp --password=wp betoniu > /srv/www/betoniu/htdocs/wp-content/dump.sql
    local | adapt dump
   remote | copying /srv/www/betoniu/htdocs/wp-content/dump.sql to /wptest.betoniu.de/wp-content/dump.sql
   remote | write /wptest.betoniu.de/wp-content/import.php
    local | download http://test.betoniu.de/wp-content/import.php?shared_key=3a7d932d04b759bde3e36811e43c1e67bd1178366231dd5d433fca208cee1a56c1279d87ee850369&start=1&foffset=0&totalqueries=0&fn=dump.sql > /srv/www/betoniu/htdocs/wp-content/temp.txt
    local | rm /srv/www/betoniu/htdocs/wp-content/temp.txt
   remote | delete: /wptest.betoniu.de/wp-content/import.php
   remote | delete: /wptest.betoniu.de/wp-content/dump.sql
    local | rm /srv/www/betoniu/htdocs/wp-content/dump.sql

pushing and pulling of files also works perfectly fine.

Just to clearify, if I create a post on my local database and push, this post is supposed to be in the production database, right?

delphaber commented 9 years ago

@essenmitsosse you are right. With this line:

download http://test.betoniu.de/wp-content/import.php?shared_key=3a7d932d04b759bde3e36811e43c1e67bd1178366231dd5d433fca208cee1a56c1279d87ee850369&start=1&foffset=0&totalqueries=0&fn=dump.sql > /srv/www/betoniu/htdocs/wp-content/temp.txt

wordmove calls the import php script and save its output to temp.txt. Temp.txt is then deleted.

Please, double check your database settings in Movefile and try again.

Probably we should not delete temp.txt so you can see the script output. Let us know

essenmitsosse commented 9 years ago

Database should be fine, because pulling works like a charm — which shouldn’t be the case if the settings would be wrong, right? I suppose there should also be a PHP error in the Log if something goes wrong — which isn’t.

essenmitsosse commented 9 years ago

Just went into to wordmove code, to comment out the line, that deletes the temp.txt file and it actually contained an error (turns out the server runs an outdated MYSQL Version, so that’s not your fault).

But yes: An option to keep that file without fooling around in your code would be great. Also it should be temp.html, since it actually is an html file.

alessandro-fazzi commented 9 years ago

We'll preserve this issue as a feature request

alessandro-fazzi commented 9 years ago

Oh...obviously thanks @essenmitsosse for the deep troubleshoot you made

delphaber commented 8 years ago

Hi,

I've just merged a PR which allows you to use wordmove with --debug flag. When debug mode is on, pulling and pushing db via FTP won't delete the temporary file, so you can inspect it and see what happened