1

I have a very interesting problem with a Multisite configuration.

Two of the sites in my Network have lost their indexes in all database tables related to the sites.

I cannot update these sites because they've totally lost their indexes. How can I recover from this? Is there a way I can restore/rebuild the indexes for each of the tables in the database?

This happened to another site in the past. I was lucky enough to be able to run a repair/optimize on the tables and it seemed to correct itself. However, I've tried the same process on these particular sites, and the problem still persists.

Any advice on what I should do here?

Database configuration:

  1. MariaDB: 10.0.28
  2. Engine: MyISAM
  3. Charset: utf8
  4. Collation: utf8_general_ci

Note: Each site in the network was once upon a time in a standalone installation. I've migrated them all into Multsite. They functioned just fine both pre-migration and post-migration. WordPress has been updated about 3-4 times since the migration. Several plugins updated as well.

  • Indexes are generated from the data in the tables, but I'd consider this a Mariadb/mysql question – Tom J Nowell Nov 1 '16 at 15:16
0

In general, you can fix the databases with some work in myPHPAdmin. See this article (among others found via the googles) https://www.a2hosting.com/kb/cpanel/cpanel-database-features/optimizing-and-repairing-mysql-databases-with-phpmyadmin

There is also this post https://www.maketecheasier.com/fix-corrupted-wordpress-database-2/ that says you can let WP repair the databases by addjine one line in your wp-config.php file:

define (WP_ALLOW_REPAIR, "true");

...placing it at the location as specified in the above link. Note that you would probably want to do this when there is no other access to the site. Although, according to the Codex https://codex.wordpress.org/Editing_wp-config.php , scroll down to the 'WP_ALLOW_REPAIR' entry) , this will:

Please Note: That this define enables the functionality, The user does not need to be logged in to access this functionality when this define is set. This is because its main intent is to repair a corrupted database, Users can often not login when the database is corrupt.

A backup of your database is always a good idea before you start.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.