Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter estoespersonal

    (@estoespersonal)

    Hi Steven

    I understand that you mean dropping the existing tables in the backup server(backup1S) and creating them again with the tables of my new server (newS), is it true?

    But I’m little worried that if I do that I can lose information of my backupserver (like the admin account) and I could never login as an administrator anymore. Should I be worried about this?

    Thanks in advice.

    Thread Starter estoespersonal

    (@estoespersonal)

    Hi Steven

    Yes, In fact what I’ve did is move first my wp_users table with all the registers in it without dropping the table. The second thing was to copy all the registers from wp_usermeta. But when I’ve tried to change the role of the user (ex: userProcess1) I’ve got an error in the log like the one shown above:

    WordPress database error Subquery returns more than 1 row for query UPDATE wp_usermeta SET meta_value = ‘a:1:{s:12:\”customrole1\”;b:1;}’ WHERE user_id = 763 AND meta_key = ‘wp_capabilities’ made by edit_user, wp_update_user, wp_insert_user, WP_User->set_role, update_user_meta, update_metadata

    Do you think it has something to do with the indexes?

    Thread Starter estoespersonal

    (@estoespersonal)

    Hi Steven

    In fact I moved first the wp_users without any trouble and after that I’ve tried to copy also the table wp_usersmeta. The “walkaround” that I used is to drop the wp_usermeta table and create ir again with all the indexes properties, etc. But I won’t say that this is a real solution to this problem. I would be glad if someone explain me what can it be.

    Thread Starter estoespersonal

    (@estoespersonal)

    Hola Javier

    Discúlpame por no responder, probé también con los slugs de los roles pero no había manera. Lo que hice fue dividir la carga de los usuarios, primero escogí el rol de CustomRole1 y cargué los 20 usuarios. Luego cargué los 50 usuarios del CustomRole2 poniendo por defecto de asignación ese rol (CustomRole2). Tenía un poco de prisa por hacerlo y manejar otras cosas así que no seguí investigando.

    Thread Starter estoespersonal

    (@estoespersonal)

    Sorry but my previous post is wrong, the line where the button redirects the user to the login page is the following.

    <li id=”wp-admin-bar-logout” class=”menuNav”>

    “>Logout

    I apologize for the confusion, the code is not mine and I’m trying to investigate about it, because each time that a user logs out all his information (and the other users) is deleted from the table wp_usermeta. Thanks in advice and sorry for the confusion

    Thread Starter estoespersonal

    (@estoespersonal)

    Hi people the code where I exit the page is the following:

    <?php get_footer(); ?>
    </body>

    <?php
    } else {
    wp_redirect(wp_login_url());
    exit;
    }} ?>
    What causes is the loss of information of my users in the table wp_usermeta, basically if I have information of the user with id 2 Uuser_test2) and the role of administrator or whatever role is identified it is automatically erased of the table. Do you know why is this happening?

    Thread Starter estoespersonal

    (@estoespersonal)

    I finnaly fixed it, the problem was with the collation of the column meta_value had a type of varchar(255), I’ve changed it to longtext and it worked again.

    Thread Starter estoespersonal

    (@estoespersonal)

    Hi, Renu

    Sadly my site is in a server that has no public internet access, so it’s in a private network for security reasons. What I’ve tried recently is changing the collate of the following tables:
    ALTER TABLE wp_usermeta MODIFY meta_value VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
    ALTER TABLE wp_usermeta MODIFY meta_value VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_usermeta MODIFY meta_key VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_users CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_usermeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_options CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_postmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_aryo_activity_log CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_comments CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_commentmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_posts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_redirection_404 CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_redirection_groups CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_redirection_items CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_redirection_logs CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_snippets CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_redirection_items CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_termmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_terms CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_term_relationships CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ALTER TABLE wp_term_taxonomy CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

    But it still doesn´t work. Do you know which fixes I’ve got to do in order to get my app running again? As I said it’s working in my preproduction server but when I migrated everything to the production server it crashes.

    If you want I can show you the wp-config.php file but I’m pretty sure it has something to do with the database because if I try to login with the “newadmin” user and a mistaken password like “badpswd” it shows a message telling me that my password is incorrect.

    What else can I do?

    Thread Starter estoespersonal

    (@estoespersonal)

    Hi, Renu
    Thanks for your reply.
    I finally inserted the new user but the problem is still the same, the admin user is not able to login into the admin area. It redirects me continuously to the https:mydomain/wp-login.php area. I’m quite sure it’s something with the database, beceause yestaerday I’ve changed the collation from utf8mb4_general_ci to utf8mb4_unicode_ci

    I’ve tried to execute the second query but it returns me the following error:
    INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value)
    VALUES (NULL, (Select max(id) FROM wp_users), ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;s:1:”1″;}’);

    Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation ‘strcmp’

    I’ve checked the collation of the database and change it to: utf8mb4_unicode_ci
    The table usersmeta has utf8mb4_unicode_ci collation and also the columns meta_key, meta_value. What I’m doing wrong?

    My phpmyadmin version is 4.7.9 and I’m using php 7.2 version

    Regards

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