Upgrade 4.5.2 to 4.5.3 deleting row in wp_options table

It’s impossible to help without having a look at your code.

As I am one of the people who worked on WordPress 4.5.3, I can assure you that it’s a usual maintenance and security release. There were no database-related changes between these versions except for #36748. Citing the commit message here:

Database: dbDelta() will no longer try to downgrade the size of TEXT and BLOB columns.

When upgrading to utf8mb4, TEXT fields will be upgraded to MEDIUMTEXT (and likewise for all other *TEXT and *BLOB fields). This is to allow for the additional space requirements of utf8mb4.

On the subsequent upgrade, dbDelta() would try and downgrade the fields to their original size again. At best, this it a waste of time, at worst, this could truncate any data larger than the original size. There’s no harm in leaving them at their new size, so let’s do that.

As you can see, this has nothing to do with the wp_options table which uses LONGTEXT. Therefore I’m sure that the situation you’re experiencing must be caused by a bug in your plugin and not something that happened during the update.

But again, it’s impossible to know for sure without sharing your source code.

Leave a Comment