WPDB WP Core Database SQL index, primary keys fix script


More info, reviews and the free script: https://wpindexfixer.tools.managedwphosting.nl/

This will re-add indexes, keys, primary indexes and enable auto-increment.
Read carefully: if you really do have primary keys (ask your webhost or webmaster) right now this script is not for you.

We even have fixes for you to delete rows where your primary key is lost and the “primary key” values are zero (0). The script will remove those corrupted rows.

The script will give you DELETE and MODIFY/ALTER table queries. You must copy paste them into your phpmyadmin or database commandline.
Warning: this is tested on mysql and mariadb for a single WP Core site (not a multisite), it might not work on your site, so make a backup first.
This will only fix your WordPress Core tables (users, posts etc..) it will not fix any other non-WP-Core tables (such as GravityForms or any other plugin or custom tables).




  1. Download the zipfile
  2. unzip
  3. upload the PHP file into wp-content/mu-plugins/ (create the mu-plugins folder if it does not exist yet).
  4. Make a database backup first
  5. Visit your site and copy the SQL commands in your database tool
  6. Remove the wp-content/mu-plugins/ script
  7. Done!


There are no reviews yet.

Be the first to review “WPDB WP Core Database SQL index, primary keys fix script”

Your email address will not be published. Required fields are marked *