• When running repair (via WP-config) on the database of a multisite WP install, that has been fine for years, we got:
    
    za_1_posts: Table 'saffavcr_jislaaik_ei97.za_1_posts' doesn't exist
    
    za_1_comments: Table 'saffavcr_jislaaik_ei97.za_1_comments' doesn't exist
    
    za_1_links: Table 'saffavcr_jislaaik_ei97.za_1_links' doesn't exist
    
    za_1_options: Table 'saffavcr_jislaaik_ei97.za_1_options' doesn't exist
    
    za_1_postmeta: Table 'saffavcr_jislaaik_ei97.za_1_postmeta' doesn't exist
    
    za_1_terms: Table 'saffavcr_jislaaik_ei97.za_1_terms' doesn't exist
    
    za_1_term_taxonomy: Table 'saffavcr_jislaaik_ei97.za_1_term_taxonomy' doesn't exist
    
    za_1_term_relationships: Table 'saffavcr_jislaaik_ei97.za_1_term_relationships' doesn't exist
    
    za_1_termmeta: Table 'saffavcr_jislaaik_ei97.za_1_termmeta' doesn't exist
    
    za_1_commentmeta: Table 'saffavcr_jislaaik_ei97.za_1_commentmeta' doesn't exist
    
    But is there even a za_1_”table” on a multisite?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    If your wp-config.php has $table_prefix = 'za_'; it’s likely a legitimate multisite table name. Use the phpMyAdmin app to see if the tables are really there or not. If not, they probably relate to a sub-site that was removed and some plugin is still trying to access its data.

    If they do exist, the code which is not finding them might be connected to the wrong DB.

    Thread Starter Jislaaik

    (@jislaaik)

    Thanks, actually it appears “wp_1_option” etc. table names are not used in multisites? I checked another multisite we have and it does not have “wp_1_options” either.

    The main site is found at plain “wp_options”.

    So why, after years, did the system suddenly start looking for non existent tables?

    By the way, when I disable sunrise.php, which activates multisite, the main site comes up as a standalone site, with no sub sites. So the info is all there in the database, but the system is not finding it for the main site – the 20 odd sub sites work fine.

    Moderator bcworkz

    (@bcworkz)

    The $table_prefix assignment in wp-config.php is what is normally determining table prefixes, be it wp_ or za_ or whatever. Multisite appends 1_, 2_, etc. as needed for individual sub-sites.

    sunrise.php, which activates multisite,

    That’s not the usual method of creating a network. I don’t know how sunrise.php works, so I cannot accurately answer your questions. I suspect something has changed in the latest WP versions and sunrise.php has not adapted to the change. Do you have the latest version of sunrise.php?

    I recommend asking through where ever you got sunrise.php for how you should proceed.

    Thread Starter Jislaaik

    (@jislaaik)

    Hi there,

    Yes, I suspect it was something in PHP 8.2 that changed.

    I actually copied all the tables without the number prefix into new tables with the _1_ prefix and it is now working.

    We do have other similar multisites with sunrise, yet they have not had a problem. A support person accidently replaced the htaccess with the default one, I suspect this could have triggered it.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database tables don’t exist?’ is closed to new replies.