WordPress database error- #1071 – Specified key was too long; max key length is 1000 bytes

I have a WordPress blog but it has some strange characters in the content like �. I found in my phpmyadmin, that in my wp_posts table, the column post_content is using latin1_swedish_ci collation. I am trying to change it to utf8_unicode_ci but it’s giving me this error:

#1071 – Specified key was too long; max key length is 1000 bytes

Read More

SQL query:

ALTER TABLE `wp_posts3` CHANGE `post_content` `post_content` LONGTEXT
CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL

How can I fix it? I asked my host (hostgator) for help but they said it’s not a problem from their end.

My ultimate goal is to get rid of the strange characters in my posts. Also, my wp-posts table has 33K+ rows since it’s a huge blog with around 10K posts.

Related posts

Leave a Reply