Support » Fixing WordPress » wp_usermeta: Table ‘wp.wp_usermeta’ doesn’t exist in engine

  • I am seeing this error which seems to be pretty common and unresolved:

    wp_users: 
    wp_usermeta: Table 'wp.wp_usermeta' doesn't exist in engine
    wp_posts: 
    wp_comments: 
    wp_options: Table 'wp.wp_options' doesn't exist in engine
    wp_postmeta: Table 'wp.wp_postmeta' doesn't exist in engine
    wp_terms: Table 'wp.wp_terms' doesn't exist in engine
    wp_term_taxonomy: Table 'wp.wp_term_taxonomy' doesn't exist in engine
    wp_term_relationships: Table 'wp.wp_term_relationships' doesn't exist in engine
    wp_termmeta: Table 'wp.wp_termmeta' doesn't exist in engine
    wp_commentmeta: Table 'wp.wp_commentmeta' doesn't exist in engine
    

    I have copy of the data (as a directory) and a dump from mysql. While this has been going on mysql stopped working so I switched to MariaDB as a drop-in replacement. Seems OK but this issue persists.

    If there is a way to install a fresh version of WP and somehow restore the info I have, that would a reasonable solution. If you are tempted to suggest I use PHPMyAdmin to “fix” this, please refrain. There is nothing PHPMyAdmin can do that I can’t do in the mysql client and if WordPress can’t fix this itself maybe it can’t be fixed. Is there really no way to recreate a table? How did it get created in the first place? I can see the create statements in the dump file I have:

    CREATE TABLEwp_usermeta` (
    `

    So why can’t WordPress use that internally?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter paul

    (@paul)

    Looks like it can be fixed by following the steps here:

    Tedious and I expect something that someone at wordpress could wrap in code.

    Thread Starter paul

    (@paul)

    Well, after a lot of time re-creating those missing tables, I am no better off. And the famous 5 minute install fails with a fresh database, with several screens full of errors, a mixture of

    WordPress database error: [Table 'wp.wp_users`’ already exists]

    WordPress database error: : [Table ‘wp.wp_options’ doesn’t exist]`

    I finally managed to get the install to work (was ABS_PATH always an option?) and restored a subset of my work.

    Pretty unsatisfying, all told.

    Thread Starter paul

    (@paul)

    It looks like the install isn’t doing the right things here:

    2021-09-06 17:29:11 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=153365,153365
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 30 was not found at ./wp/wp_users.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 31 was not found at ./wp/wp_usermeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 32 was not found at ./wp/wp_termmeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 33 was not found at ./wp/wp_terms.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 34 was not found at ./wp/wp_term_taxonomy.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 35 was not found at ./wp/wp_term_relationships.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 36 was not found at ./wp/wp_commentmeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 37 was not found at ./wp/wp_comments.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 38 was not found at ./wp/wp_links.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 39 was not found at ./wp/wp_options.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 40 was not found at ./wp/wp_postmeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 41 was not found at ./wp/wp_posts.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 54 was not found at ./wp/wp_users.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 55 was not found at ./wp/wp_usermeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 56 was not found at ./wp/wp_termmeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 57 was not found at ./wp/wp_terms.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 58 was not found at ./wp/wp_term_taxonomy.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 59 was not found at ./wp/wp_term_relationships.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 60 was not found at ./wp/wp_commentmeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 61 was not found at ./wp/wp_comments.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 62 was not found at ./wp/wp_links.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 63 was not found at ./wp/wp_options.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 64 was not found at ./wp/wp_postmeta.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Tablespace 65 was not found at ./wp/wp_posts.ibd.
    2021-09-06 17:29:11 0 [ERROR] InnoDB: Plugin initialization aborted with error Tablespace not found
    2021-09-06 17:29:11 0 [Note] InnoDB: Starting shutdown...
    

    At least of the files exists:

    [root@www /var/db/mysql/wp]# file wp_postmeta.ibd
    wp_postmeta.ibd: data
    [root@www /var/db/mysql/wp]# ls -l wp_postmeta.ibd
    -rw-rw----  1 mysql  mysql  163840 Sep  6 17:08 wp_postmeta.ibd
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_usermeta: Table ‘wp.wp_usermeta’ doesn’t exist in engine’ is closed to new replies.