-
Notifications
You must be signed in to change notification settings - Fork 169
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
Path and URL substitution clash #582
Comments
Hi @marekmaurizio , first of all
it's not a bug, it's a feature. Or at least it is intended to be such from the beginning of Wordmove's history. Wordmove thinks that you could have the local path hardcoded somewhere in your database. Just to take a casual but real example: Honestly I don't know if we should take care of such a thing, but we do. Now the "problem" here is that Let me ask one question: are you using FTP protocol by any chance? Having Let me know so that I can have a wider vision. TIA |
No FTP. Just a staging website, this naming is the default in plesk so it
happens quite often.
I think I never had any instance of path encoded in database.
Il mar 11 feb 2020, 09:55 Alessandro Fazzi <[email protected]> ha
scritto:
… Hi @marekmaurizio <https://github.com/marekmaurizio> ,
first of all
Wordpress path get substituted in URLS
it's not a bug, it's a feature. Or at least it is intended to be such from
the beginning of Wordmove's history. Wordmove thinks that you could have
the local path hardcoded somewhere in your database.
Just to take a casual but real example:
[image: Image 2020-02-11 at 9 32 44 AM]
<https://user-images.githubusercontent.com/904690/74221179-c5392380-4cb1-11ea-8422-5b32801c821a.png>
Honestly I don't know if we should take care of such a thing, but we do.
Now the "problem" here is that /staging.website.it is a substring of
https://staging.website.it so when Wordmove is searching for the path it
finds URLs also. And for sure it brings a big problem.
Let me ask one question: are you using FTP protocol by any chance? Having
/staging.website.it as a real directory on the remote server sounds
strange to me and it looks more likely to be an FTP jail.
Let me know so that I can have a wider vision. TIA
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#582?email_source=notifications&email_token=AAGGHWM3SFACA3HAXHD63ILRCJRXRA5CNFSM4KPZTBIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELLUABA#issuecomment-584531972>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGGHWMNY2EVTGQESE2PJQ3RCJRXRANCNFSM4KPZTBIA>
.
|
Ok; I'd ask you to do a test, if you mind to. Create a file named search-replace:
precise: true then blank your DB and go for a new clean Let me know if that helps. This test would help me too to understand how and if implement a fix. TIA |
I have tried the It solved the issue at least partially -- no images are pointing to localhost any more, and several link/button HREFs have being correctly replaced. Just for further info: Elementor saves some data in JSON format in
When not using Hope this helps |
Update: not yet there. An experimental |
Hey @dew-frost , I've put my thoughts on this string
and ... well ... it's somewhat interesting. That does not appear to be a serialized object. AFAIK WP-CLI supports string replacement for strings and serialized objects, but if Elementor is (really?) putting Take a look at this example:
As we can see, we're still able to find Keep in mind that nor our old hand written The only solution grinding my gears but still possilble is to introduce a hook calling hooks: # Remote hooks won't work with FTP
push:
after:
- command: 'wp search-replace "http:\/\/localhost" "http:\/\/example.com" --skip-columns=guid'
where: remote
pull:
after:
- command: 'wp search-replace "http:\/\/example.com" "http:\/\/localhost" --skip-columns=guid'
where: local Obviously this is a not tested idea about a workaround for an issue which does not seem to be really wordmove-related :) |
@marekmaurizio any update from your side? :) |
Hi @pioneerskies
thank you :) Of course the website in question has no SSH access enabled (long story...) so it will not be possibile to try the hook approach in the specific case. The first time I'm on a website that allows me to use SSH, I'll try it, just for the hell of it. However, after playing some more with DB Don't keep this issue open just because of this ;) |
Related to #616 . |
Describe the bug
Wordpress path get substituted in URLS.
For instance after the pull, my local page has links like this:
background-image: url(https://Users/marek/Projects/Larin/website-it/website-it/wp-content/uploads/2019/12/TREVI_az_02.jpg);
Wordmove command
wordmove pull -e staging -d
Expected behavior
The path substitution should not clash with the database. Maybe I am missing a way to disable it.
movefile.yml
`
local:
vhost: https://www.website.local
wordpress_path: /Users/marek/Projects/Larin/website-it/website-it
staging:
vhost: https://staging.website.it
wordpress_path: /staging.website.it
`
Environment (please complete the following information):
Doctor
[x]
wordmove doctor
is all greenThe text was updated successfully, but these errors were encountered: