• Resolved mintlars

    (@mintlars)


    I was migrating my site, which is on a shared host, to a localhost environment for development purposes, but I ran into some trouble during the site-install on localhost.

    The installer failed to create a new admin user, although I made sure it was unique. Trying to log in to the new site with my usual admin log in also failed (invalid username and/or password).

    It took me a while to figure out, but I discovered that Duplicator simply had’nt migrated important database tables into the package. In my case, it didn’t create the wi1_users and wi1_usermeta tables (also some noncritical plugin tables), which made all log in attempts fail.

    I solved it by simply exporting the missing tables from my shared host site to my localhost environment, but I’m guessing this is not the desired behaviour of Duplicator. I realized that the package I created had filtered these two tables as default behaviour, but than it shouldn’t have failed creating a new admin user, which it did.

    Just letting you know. Mark as solved.

    https://wordpress.org/plugins/duplicator/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hey Mark,

    Hmmm nobody has ever reported this exact behavior, that is quite odd. Have you been able to reproduce it consistently? That is definitely not desired behavior

    Cheers~

    Thread Starter mintlars

    (@mintlars)

    Yep, I can reproduce it, both on localhost and my shared hosting account. It always fails creating the user tables even though I deactivate all plugins.

    Steps to reproduce:
    1. Create package of original site, filtering wi1_users and wi1_usermeta tables.
    2. Run the Duplicator installer on new domain and choose to create a new admin user.

    Desired behaviour: Should recreate filtered user tables and enter the new admin user in wi1_users.

    Actual behaviour: Fails to create user tables, thus doesn’t create the new admin user. Fails with warning “NEW WP-ADMIN USER: Failed to create the user ‘<username>'”

    Let me double check just so I understand. When you create the package you are:
    1. Clicking the Database Tab
    2. Checking the checkbox that says “Enable Table Filters”
    3. Checking the checkbox for wi1_users and wi1_usersmeta (you will see the text crossed out, meaning it will be excluded from the SQL build)

    Is this correct?

    Note: When you exclude a table that means it will not be created…

    Thread Starter mintlars

    (@mintlars)

    Yes, that is correct.

    Hey Mintlars,

    So then its not going to include those two tables if your excluding them… You have to include them if you what them as part of your build. If you want them to be empty then you can clear out the data you don’t want after the installer is complete.

    Hope that helps!

    Thread Starter mintlars

    (@mintlars)

    Yes, well I know that, and I’ve did that my self. That wasn’t the point in posting it here. The point was that it’s probably not what you would expect if you filter out the user tables.

    If I don’t want the user tables as part of my build (ie. clear out all user data), than I should still be able to log in to the new site with a new admin account, which is impossible with the current behaviour. This makes it quite useless for people who are not familiar with database management.

    For me, this is no problem, since I know how to handle databases, but it did give me trouble trying to figure out why a new admin account couldn’t be created and why I couldn’t use my old admin account either. It’s just an annoying issue that took some time to solve.

    That’s why you should consider this a bug report.

    Sounds good… Will as a todo item to look into…

    Thxs

    Elina

    (@elina-cristina)

    Something like this happened to me too, but it wasn’t any bug of Duplicator. I’ve found out it was due to different collation in database tables. I’ve intalled wordpress in localhost and then imported the demo data of a certain template and the tables created by the template had different collation, so they couln’t be imported neither through Duplicator nor manually.

    Solution: check out the database and change the tables and entries collation to make sure they’re all the same (ex: utf8 or utf8mb4). Then run Duplicator again and create new packages. This time things must work properly.

    Thanks for posting that update Elina!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Bug? Duplicator skips important database tables’ is closed to new replies.