Thank you @blu! I can confirm that works as expected.
EDIT: Updating Vagrant to version >2.0.4 can lead to some unexpected behavior such as Trellis not recognizing the installed plugins like āvagrant-hostmanagerā. For reference:
Thank you @blu! I can confirm that works as expected.
EDIT: Updating Vagrant to version >2.0.4 can lead to some unexpected behavior such as Trellis not recognizing the installed plugins like āvagrant-hostmanagerā. For reference:
@pacotole, I just tested trellis-simple-sync on my site, and it works, thanks! Running your sync was quite an effective check on my Staging site setup as I had somehow managed to set it up incorrectly, but yet it was working. All good now.
I have a question:
You only run one search-replace command of the format:
"wp", "search-replace", "https://example.local", "https://staging.example.com", "--all-tables"
This works, but does not cover all of my development (example.local) URLs, as many instances exist where the URL is not āhttps://example.comā. It can be one of:
I have searched for info on this scenario, but all references to running search=replace only describe URL examples that contain the text āhttp://ā or āhttps://ā.
Do you know if this is a problem with my WordPress site, or if I just need to modify your Ansible scripts to add 2 extra calls to search-replace to cater for http://example.local
and example.local
?
Also, how do you recommend handling guid columns?
Thanks @henscu
In my case, I use http in development and https in staging/production so I need to change the url with protocol included.
trellis-simple-sync automatically detects if SSL is active in each environment and replace the correct url.
Iāll add an extra search-replace task protocol-relative "//example.com"
to ensure all urls are replaced.
Generally, I donāt recommend to change domain without protocol "example.com"
because it can be part of the web content, like legal texts or if the domain is the name of the site (e.g.: āWelcome to example.com ā¦ā) but in particular cases may be necessary. You can add your extra tasks if needed.
About GUIDs, as far as I know, they are used as a unique identifier in the XML feeds.
If you are syncing a new site between dev <-> staging/production there is no problem.
If you are migrating from an old domain to a new domain and have many subscribers, you should keep the same GUID (wp search-replace ... --skip-columns=guid
) to prevent that all old posts appear as new posts on feed readers.