Skip to content
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

Imported subsite is not working #70

Open
derekPrivate opened this issue Nov 30, 2019 · 10 comments
Open

Imported subsite is not working #70

derekPrivate opened this issue Nov 30, 2019 · 10 comments
Assignees

Comments

@derekPrivate
Copy link

I export a subsite from a live system:

wp mu-migration export all subsite.zip --blog_id=2 --path=/var/www/html/wordpress --plugins --themes --uploads

I then import into a new (clean, multisite) Wordpress installation:

wp mu-migration import all subsite.zip --new_url=mynewsite.com/wordpress/subsite --blog_id=2

When finished, the site appears in the list of sites in the Network Admin, but if I try to Visit Site or show the Dashboard, I get a connection timeout error in my browser.

One curious thing is that during the import, I see the following messages:
Extracting zip package...
Importing tables...
Warning: Something went wrong while running sed
Warning: Something went wrong while running sed
Warning: Something went wrong while running sed
Warning: Something went wrong while running sed
Warning: Something went wrong while running sed
Warning: Something went wrong while running sed
Warning: Something went wrong while running sed
Warning: Something went wrong while running sed
Moving files...
etc...

Any ideas on why this is not working? Anything I can try to help track down the issue? Note that the default site continues to work, and I can still access the Network Admin pages, just not my imported subsite.

p.s. this is a new Wordpress install, so I can easily delete Wordpress and database, and set it up again - takes me less than 5 minutes!

@derekPrivate
Copy link
Author

Should have mentioned - I am using Wordpress 5.3.

@nicholasio
Copy link
Member

@derekPrivate it looks like the server you're running MU-MIgration either does not have sed or something is wrong with it.

Can you run this on your terminal and let me know the result?

echo "wp_" | sed "s/wp_/wp_5_/g"

@derekPrivate
Copy link
Author

derekPrivate commented Dec 3, 2019 via email

@nicholasio
Copy link
Member

Are you running MU-Migration in a linux server?

@derekPrivate
Copy link
Author

derekPrivate commented Dec 3, 2019 via email

@nicholasio
Copy link
Member

This CLI tool has no official support for Mac OS, but I guess it shouldn't be too hard to come up with a fix for Mac OS, sed works a bit different on Mac OS when compared to Linux and that's probably why the sed commands this tool run is not working for you.

@nicholasio
Copy link
Member

This is where the sed commands run in case you want to try something: https://github.com/10up/MU-Migration/blob/master/includes/commands/class-mu-migration-import.php#L663

I'll see what I can find.

@nicholasio
Copy link
Member

nicholasio commented Dec 3, 2019

@derekPrivate Can you try replacing this line https://github.com/10up/MU-Migration/blob/master/includes/commands/class-mu-migration-import.php#L685 with this:

sed -i'' -e '$sed_command' $filename

@derekPrivate
Copy link
Author

derekPrivate commented Dec 3, 2019 via email

@Olya-Tom
Copy link

Olya-Tom commented Nov 23, 2022

Hello, the same sed error. I use WSL, only the site is not being imported, here is the error ERROR 1050 (42S01) at line 25 in file: 'mu-migration1669197215/mu-migration-1090416661oneadvocate-eu.sql': Table 'wp_addonlibrary_addons' already exists , I tried deleting the entire site and tables in turn, etc, nothing it doesn't help. but this happens when I import to a multisite blog_id=2 if I import without blog_id, then everything works. I tried to change these lines sed -i'' -e '$sed_command' $filename no effect, and % echo "wp_" | sed "s/wp_/wp_5_/g"
wp_5_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants