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

db not pulled into local using ftp #259

Closed herbie4 closed 8 years ago

herbie4 commented 8 years ago

When I do:$ wordmove pull -e production -d the home and site url do not change to the local environment. Any suggestions?

yuranikolaev commented 8 years ago

Same thing with remote

herbie4 commented 8 years ago

Was running 1.3.1 so I did a downgrade to wordmove 1.2.0. Some reported it worked, but no result for that option.

herbie4 commented 8 years ago

Update: It looks like the local/wp-content/dump.sql is empty so the production db is not being pulled.. No errors in terminal.

Ikaring commented 8 years ago

Which option do you use ssh or ftp? It might be because of Movefile settings.

herbie4 commented 8 years ago

@Ikaring I am using ftp. I can see dump.mysql is created on the server but not removed. Database is not being filled on the local side.

Ikaring commented 8 years ago

I had similar situation before with ftp, and my workaround was like so:

  1. Set both wordpress_path and wordpress_absolute_path for staging ( or production ). wordpress_path is from ftp root directory, and wordpress_absolute_path is absolute server path.
  2. Since I had put WordPress core in sub directory (wp/), I had initially set vhost and wordpress_path as this: vhost: "http://myproject.local" wordpress_path: "/Users/ikaring/myproject/wp" However, that doesnt work correctlly. You need to add /wp for vhost, too. vhost: "http://myproject.local/wp"

    This is necessary for both local and staging.

  3. And add the following to your wp-config.php for setting home url explicitly: define( 'WP_HOME', 'http://myproject.local' ); define( 'WP_SITEURL', 'http://myproject.local/wp' );
herbie4 commented 8 years ago

@Ikaring Thank you! I will test this tonight. Will get back about how it works out.

herbie4 commented 8 years ago

@Ikaring Did some testing with ftp, but it still is not working.

To rule out server issues I tried it also on a different server. Still no local database is being pulled in.

In terminal there are no errors all the path seem to be okay.

Looks like the server sql file data is not transfered to local. I can see dump.sql being created localy and then is removed.

If I create a dump.sql file and run the mysql line from terminal the local database gets filled up. So that part is working too.

Ikaring commented 8 years ago

I dont have not much idea. Which version of Wordmove do you use now? It is better use 1.2.0 especially for use with ftp.

I found a post that some DB needs charset: "utf8" under database section explicitly in Movefile. I dont think this is for your case, since you dont get any errors. Just for your info.

I paste successful terminal process below for your reference. There are 7 steps for pull -d.

▬▬ ✓ Pulling Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ local | mysqldump --host=localhost --user=admin --password=pass mydb > /Users/ikaring/myproject/wp/wp-content/local-backup-1454635042.sql remote | write /wp/wp-content/dump.php local | download http://myproject.com/wp/wp-content/dump.php?shared_key=198d8301990ad39f985dffed46c5c15c4f91f284f66ed6942c82f55dbbd537197ae2f83bb8c02960 > /Users/ikaring/myproject/wp/wp-content/dump.sql remote | delete: /wp/wp-content/dump.php local | adapt dump local | mysql --host=localhost --user=admin --password=pass --database=mydb < /Users/ikaring/myproject/wp/wp-content/dump.sql local | rm /Users/ikaring/myproject/wp/wp-content/dump.sql

herbie4 commented 8 years ago

@Ikaring Thank you for the information so far. Very helpfull. I downgraded Wordmove to version 1.2.0 and now it is working. Great!