Overview
Like all database systems, MySQL and MariaDB have limits on certain sizes of items which in rare circumstances may cause an error on your website. If you’re receiving an error based on row size limits, it may appear as:
ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help.
Or:
WordPress database error Index column size too large. The maximum column size is 767
This may appear as other similar errors or indicate different size limits. These limitations are due to an older default row format used for the database (compact), which opted for space savings over flexibility.
Instructions
To fix the error, we can update the row format for the database to Dynamic which allows for greater column and header sizes.
- Login to Plesk, then go to phpMyAdmin for the affected database.
- Select the affected table, then go to Structure:
- Scroll down to the Information section and confirm the current row format is Compact:
- If it’s set to Compact, we can alter the table structure to use the Dynamic row format, then issue an OPTIMIZE command to cleanly re-create the table:
ALTER TABLE `<TABLENAME>` ROW_FORMAT=DYNAMIC;
OPTIMIZE TABLE `<TABLENAME>`; - Test that the function or part of the website causing the error has now been resolved.