Title: Primary Key Fixer
Author: omelhus
Published: <strong>August 5, 2020</strong>
Last modified: August 29, 2021

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/primary-key-fixer.svg)

# Primary Key Fixer

 By [omelhus](https://profiles.wordpress.org/omelhus/)

[Download](https://downloads.wordpress.org/plugin/primary-key-fixer.zip)

 * [Details](https://wordpress.org/plugins/primary-key-fixer/#description)
 * [Reviews](https://wordpress.org/plugins/primary-key-fixer/#reviews)
 * [Development](https://wordpress.org/plugins/primary-key-fixer/#developers)

 [Support](https://wordpress.org/support/plugin/primary-key-fixer/)

## Description

Plugins like Yoast and Slider Revolution doesn’t create a PRIMARY KEY on tables 
when they are created. This is an issue when using services like Digital Ocean managed
databases etc that uses replication and requires primary keys.

By installing this plugin it will add a query filter and look for queries that include
CREATE TABLE and UNIQUE KEY, but not PRIMARY KEY, and insert a PRIMARY KEY for the
same field as the UNIQUE KEY.

It will not fix restore where the query includes multiple create table and some 
of them contains ‘primary key’.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Primary Key Fixer” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ omelhus ](https://profiles.wordpress.org/omelhus/)

[Translate “Primary Key Fixer” into your language.](https://translate.wordpress.org/projects/wp-plugins/primary-key-fixer)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/primary-key-fixer/),
check out the [SVN repository](https://plugins.svn.wordpress.org/primary-key-fixer/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/primary-key-fixer/)
by [RSS](https://plugins.trac.wordpress.org/log/primary-key-fixer/?limit=100&mode=stop_on_copy&format=rss).

## Meta

 *  Version **1.3**
 *  Last updated **5 years ago**
 *  Active installations **200+**
 *  WordPress version ** 5.1 or higher **
 *  Tested up to **5.8.13**
 *  PHP version ** 7.2 or higher **
 *  [Advanced View](https://wordpress.org/plugins/primary-key-fixer/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/primary-key-fixer/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/primary-key-fixer/reviews/)

## Contributors

 *   [ omelhus ](https://profiles.wordpress.org/omelhus/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/primary-key-fixer/)