-
Notifications
You must be signed in to change notification settings - Fork 48
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
Cloning a subsite using export/import --new_url affects the source subsite domain #67
Comments
@ppiotr3k Are you importing the exported site in the same subsite? If so this is very likely an unhandled edge case, since when the search-replace takes place to replace the URL, it affects both subsites given they both have the same URL/Domain at the time search-replace is run and since search-replace is performed with the We can probably solve this by restricting the search-replace to the imported subsite and handling the search-replace of the necessary global tables manually. |
@nicholasio I confirm this is an export/import in the same WordPress multisite deployment. The export/import features are used as a cloning operation, providing a new URL for the target during import. Also, I haven't noticed previously, but indeed the URL is replaced in the source site in other places as well, with the target site URL, as explained in your possible cause analysis 👏 |
Confirmed this is an issue for me as well. |
For others following, my workaround was to use wp-cli to change the site address to the "new site address" prior to exporting. Once the export is done, the script changes the site address back. Then, upon importing, you don't need to specify a new address. I think I've mostly finished with the bash script, if anyone is interested lmk and I'll finish it up and provide. |
Hey @jmtornetta, still got that script somewhere? :) |
Describe the bug
When cloning a subsite in a multisite install using export/import, the source subsite domain is updated to the target subsite URL.
Steps to Reproduce
wp mu-migration export all --blog_id=8 /tmp/blog_template.zip --themes --plugins --uploads
wp mu-migration import all /tmp/blog_template.zip --new_url="https://mynew.url"
domain
in DBExpected behavior
source subsite is not affected by the creation of a new subsite when using export/import with
--new_url
The text was updated successfully, but these errors were encountered: