πŸ”ž ADULT: Ticket/ - Full Gallery 2025

Opened 6 months ago

Last modified 6 months ago

#63661 new enhancement

Display admin error message if AUTO_INCREMENT attribute is missing on WP core tables

Reported by: bangelov's profile bangelov Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Site Health Keywords: needs-patch 2nd-opinion
Focuses: administration Cc:

Description

WordPress relies on the AUTO_INCREMENT attribute on core database tables to function correctly. When this attribute is missing, it can lead to issues with data integrity and data creation.

For example:
DB Migration - by default AWS DMS’s Basic Schema Copy will not preserve the AUTO_INCREMENT (identity) property on your target tables. It only creates the tables and primary-key definitions; things like secondary indexes, foreign-key constraints and auto-increment attributes are skipped during the load

To improve user experience and prevent potential issues, it would be beneficial to add an admin notice that detects and alerts site administrators if any core tables are missing the AUTO_INCREMENT attribute. This proactive warning would guide administrators to correct their database schema, ensuring WordPress operates smoothly

Change History (2)

#1 @jorbin
6 months ago

  • Component changed from Database to Site Health
  • Keywords needs-patch added

Moving this to Site Health since that is the method for surfacing problems with a WordPress installation.

#2 @johnbillion
6 months ago

  • Keywords 2nd-opinion added

This seems like an extreme scenario that causes a critical issue. Site Health isn't the place for that, but this isn't the kind of check that should happen on every page load either.

Is it realistic or practical to gracefully handle a broken database schema?

Note: See TracTickets for help on using tickets.