Closed tommyyama2020 closed 2 years ago
Hi,
I "simply" think that your wordpress_path
is not where your wordpress installation actually is. Thus this wp
command
wp search-replace --path=[secret]
is complaining about it's not finding a proper WP there
Hi thanks. i thought same exactly like you and tried with --path="path/to/wordpress" . wp config and wordmove yml files are in there it is still same error ..
is there any way to see this [secret] part ? i could not find where this --path=[secret][secret] part was set. Plus, wp command could not work if i tried a command in different folder.
For sure: given a movefile.yml
# [...]
local:
vhost: http://127.0.0.1:8080
wordpress_path: /home/john/sites/your_site # use an absolute path here
# [...]
the wordpress_path
is passed as an argument to wp-cli's --path
flag. So, following the example, you'll have
wp search-replace --path=/home/john/sites/your_site [...]
WP-CLI works by inovking wp
command inside a wordpress installation (root or deeper level). When wordmove
wraps WP-CLI's command, it uses the --path
(ref: https://make.wordpress.org/cli/handbook/references/config/#global-parameters) flag in order to be sure to force the right execution location, even if your flow requires to work outside of the wordpress installation (docker? bedrock? maybe Local too?)
A complete search-replace
command produced by wordmove will looks like, e.g.:
wp search-replace --path=/home/john/sites/your_site http://127.0.0.1 https://example.com --quiet --skip-columns=guid --all-tables --allow-root
But in order to test WP-CLI execution you don't need to manually run such command (it will modify you database, so I do not recommend to do so if you're not aware of it), but you could use an unobstrusive command such as wp core version
.
The error you're getting is thrown by WP-CLI whichever the command you'll invoke.
Moreover, and concluding, it seems that Local has some specific implication about WP-CLI's configuration: https://localwp.com/community/t/wp-cli-error-pass-path-path-to-wordpress/2333/3 (but the post is a bit old, so please double check it yourself).
@tommyyama2020 this is a more complete and thus correct explanation about how --path
is populated: https://github.com/welaika/wordmove/wiki/movefile.yml-configurations-explained#note-about-the---path-flag
Please be sure to understand this if Local is actually internally using a wp-cli.yml
file.
thanks. The same came up.i am asking for double-checking it.
Hi @pioneerskies I have an error can't pull the database on Linux and subsystem for Linux
wordmove pull -e production -d
▬▬ Using Movefile: ./movefile.yml ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬ Pulling Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
local | mysqldump --host=[secret] --user=chinh --password=[secret] --result-file="[secret]/wp-content/local-backup-1608624958.sql" local_spot
remote | write [secret]/wp-content/dump.php
local | download [secret]wp-content/dump.php?shared_key=217fb2b80a9d630f1aaf9f42f2719c4d73xxxxxxxxxxxxxxxxxxxxxxe186ea44ab29bf8fa > [secret]/wp-content/dump.sql
Traceback (most recent call last):
26: from /home/chinhbui/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
25: from /home/chinhbui/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
24: from /home/chinhbui/.rvm/gems/ruby-2.7.0/bin/wordmove:23:in `<main>'
23: from /home/chinhbui/.rvm/gems/ruby-2.7.0/bin/wordmove:23:in `load'
22: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/exe/wordmove:6:in `<top (required)>'
21: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
20: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
19: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
18: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
17: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:91:in `pull'
16: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:39:in `handle_options'
15: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:39:in `each'
14: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:40:in `block in handle_options'
13: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/cli.rb:92:in `block in pull'
12: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/deployer/ftp.rb:44:in `pull_db'
11: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/deployer/ftp.rb:121:in `download_remote_db'
10: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/deployer/base.rb:103:in `download'
9: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/deployer/base.rb:103:in `open'
8: from /home/chinhbui/.rvm/gems/ruby-2.7.0/gems/wordmove-5.2.1/lib/wordmove/deployer/base.rb:104:in `block in download'
7: from /home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:50:in `open'
6: from /home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:744:in `open'
5: from /home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:174:in `open_uri'
4: from /home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:233:in `open_loop'
3: from /home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:233:in `catch'
2: from /home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:235:in `block in open_loop'
1: from /home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:764:in `buffer_open'
/home/chinhbui/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/open-uri.rb:387:in `open_http': 403 Forbidden (OpenURI::HTTPError)
and movefile config is:
global:
sql_adapter: wpcli
local:
vhost: "http://127.0.0.1/local_sapot/"
wordpress_path: "/home/chinhbui/work/web/local_sapot" # use an absolute path here
database:
name: "local_sapot"
user: "chinh"
password: "admin" # could be blank, so always use quotes around
host: "127.0.0.1"
production:
vhost: "https://sapot11.vn/"
wordpress_path: "/httpdocs" # use an absolute path here
database:
name: "sapot"
user: "admin"
password: "xxxxxx@_"
host: "xxxxxx.xxxx.vn"
exclude:
- '.git/'
- '.gitignore'
- '.gitmodules'
- '.env'
- 'node_modules/'
- 'bin/'
- 'tmp/*'
- 'Gemfile*'
- 'Movefile'
- 'movefile'
- 'movefile.yml'
- 'movefile.yaml'
- 'wp-config.php'
- 'wp-content/*.sql.gz'
- '*.orig'
ftp:
user: "xxxxxx"
password: "xxxxxx@_"
host: "xxxxxx.xxxxx.vn"
passive: true
can you help me resolve it ? Thanks ..
Hey @xuanchinh1994 ,
it would be better to open a fresh new help ticket; moreover because your problem in not releted with the one presented by @tommyyama2020 .
Just to give you a clue:
`open_http': 403 Forbidden (OpenURI::HTTPError)
means that your server is negating an HTTP connection from your local machine. Do you have HTTP basic auth or something similar blocking the site from public visits? FTP adapter needs to connect to the site through HTTP in order to get your database...if it can't connect there is not an effective workaround.
Thanks @pioneerskies
I'll open new ticket. https://github.com/welaika/wordmove/issues/613
And I tried to check it but couldn't find the cause
Hi,
Got error below with wordmove pull -d. OS is mac. wordmove, ruby are latest. localbyflywheel is used to set up wordpress. wp command is working fine. yml's setting is ok.
"this does not seem to be a wordpress installation wordmove"