Closed nicholasio closed 7 years ago
Am I doing it wrong,? The single site is not updated
In single site:
git clone -b feature/single-site-import --single-branch https://github.com/10up/MU-Migration/
wp package install /path/MU-Migration
wp mu-migration import all subsite.zip
wp mu-migration import all subsite.zip --debug
gives me:
Debug (bootstrap): No readable global config found (0.014s)
Debug (bootstrap): Using project config: //wp-cli.yml (0.015s)
Debug (bootstrap): Loading packages from: /root/.wp-cli/packages/vendor/autoload.php (0.074s)
Debug (bootstrap): Required file from config: /etc/scripts/wp-cli/fw-local-search-replace.php (0.082s)
Debug (bootstrap): ABSPATH defined: /app/public/ (0.082s)
Debug (bootstrap): Begin WordPress load (0.084s)
Debug (bootstrap): wp-config.php path: /app/public/wp-config.php (0.085s)
Debug (bootstrap): Loaded WordPress (0.496s)
Debug (bootstrap): Running command: mu-migration import all (0.496s)
Extracting zip package...
You'll need to install it as a plugin, and run composer install manually, if you install it via package install it will download from master branch.
Sent from my iPhone
On Aug 31, 2017, at 8:42 AM, Per Søderlind notifications@github.com wrote:
Am I doing it wrong,? The single site is not updated
In single site:
git clone -b feature/single-site-import --single-branch https://github.com/10up/MU-Migration/ wp package install /path/MU-Migration wp mu-migration import all subsite.zip wp mu-migration import all subsite.zip --debug gives me:
Debug (bootstrap): No readable global config found (0.014s) Debug (bootstrap): Using project config: //wp-cli.yml (0.015s) Debug (bootstrap): Loading packages from: /root/.wp-cli/packages/vendor/autoload.php (0.074s) Debug (bootstrap): Required file from config: /etc/scripts/wp-cli/fw-local-search-replace.php (0.082s) Debug (bootstrap): ABSPATH defined: /app/public/ (0.082s) Debug (bootstrap): Begin WordPress load (0.084s) Debug (bootstrap): wp-config.php path: /app/public/wp-config.php (0.085s) Debug (bootstrap): Loaded WordPress (0.496s) Debug (bootstrap): Running command: mu-migration import all (0.496s) Extracting zip package... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
You're almost there.
git clone -b feature/single-site-import --single-branch https://github.com/10up/MU-Migration/ wp-content/plugins/
cd wp-content/plugins/MU-Migration
composer install
wp plugin activate MU-Migration
wp mu-migration export all subsite.zip --blog_id=2 --plugins --themes --uploads
wp mu-migration import all ./subsite.zip
Front page looks fine, but it looks like search-replace
hasn't been run, all links on front-page points to multisite.dev, wp-login.php redirects to multisite.dev:
http://multisite.dev/subsite2/wp-login.php?redirect_to=http%3A%2F%2Fmumigration.dev%2Fwp-admin%2F&reauth=1
eh .. wait a bit, I used the master branch plugin when I exported the site. Should I this feature branch plugin when I export also ?
You should use the feature branch to export and you should also pass the new_url parameter in case you want to change it
Sent from my iPhone
On Aug 31, 2017, at 12:31 PM, Per Søderlind notifications@github.com wrote:
eh .. wait a bit, I used the master branch plugin when I exported the site. Should I this feature branch plugin when I export also ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I've tested this and it looks good to me.
When importing the site, this is what you need:
wp mu-migration import all ./subsite.zip --new_url=mumigration.dev
Also make sure to export the subsite using this featured branch.
--new_url=mumigration.dev
did it.
The only errors I've found are:
pertest
, role editor, Moving Uploads...
, but the uploads folder is empty, the zip has the uploads:$ unzip -l subsite.zip | grep uploads
0 2017-08-31 09:44 wp-content/uploads/2017/08/
106906 2017-08-31 09:44 wp-content/uploads/2016/12/01_NerverIEnBunt-mp3-image-1024x1024.jpg
137512 2017-08-31 09:44 wp-content/uploads/2016/12/01_NerverIEnBunt-mp3-image-1200x1200.jpg
6241 2017-08-31 09:44 wp-content/uploads/2016/12/01_NerverIEnBunt-mp3-image-150x150.jpg
17547 2017-08-31 09:44 wp-content/uploads/2016/12/01_NerverIEnBunt-mp3-image-300x300.jpg
69732 2017-08-31 09:44 wp-content/uploads/2016/12/01_NerverIEnBunt-mp3-image-768x768.jpg
229856 2017-08-31 09:44 wp-content/uploads/2016/12/01_NerverIEnBunt-mp3-image.jpg
8012144 2017-08-31 09:44 wp-content/uploads/2016/12/01_NerverIEnBunt.mp3
86203 2017-08-31 09:44 wp-content/uploads/2016/12/06_Ekkoskritt-mp3-image-1024x1024.jpg
110004 2017-08-31 09:44 wp-content/uploads/2016/12/06_Ekkoskritt-mp3-image-1200x1200.jpg
5473 2017-08-31 09:44 wp-content/uploads/2016/12/06_Ekkoskritt-mp3-image-150x150.jpg
14711 2017-08-31 09:44 wp-content/uploads/2016/12/06_Ekkoskritt-mp3-image-300x300.jpg
56240 2017-08-31 09:44 wp-content/uploads/2016/12/06_Ekkoskritt-mp3-image-768x768.jpg
187089 2017-08-31 09:44 wp-content/uploads/2016/12/06_Ekkoskritt-mp3-image.jpg
6873218 2017-08-31 09:44 wp-content/uploads/2016/12/06_Ekkoskritt.mp3
I'll take a look at the uploads thing. The user could be just that you already had a user with that email before importing the site. When importing into a single install it does not copy the whole users table as is, instead it adds each user that belongs to the subsite into the single site separately.
@soderlind I wasn't able to replicate the uploads issue, you might have a permission problem on your server. I'm merging this PR to master, but feel free to open a new issue if something is not working as expected.
Works like a charm, thank you :)
This PR makes it possible to import subsites previously exported with the tool into a single WordPress installation. #25
This is a work in progress, needs more testing: