Index the meta_key in the postmeta table

Speed up your website by making sure that the meta_key column in the postmeta table is properly indexed, making queries much faster on larger sites.

While the column appears to be indexed by default, the use of utf8mb4 now limits the indexing of columns to a maximum of 191 characters. The meta_key column being 256 characters, it is not indexed.

This power tweak changes the column size down to 191 characters if possible, and makes sure the column can be indexed.

Posted in: Power tweaks