WordPress problem create post above 1MB

Ever have problem in posting articles above 1MB ? Guess i’ve found the the solution for this problem.

No clue at all in the beginning, post just don’t show up if it’s above 1MB.

First i think it’s something settings in php.ini related to max_post, so i changed it to:

post_max_size = 100M
upload_max_filesize = 100M

No luck so far, so i try to look further at the WYSIWYG editor (TinyMCE here), but apparently that’s not where the source of problem.

So i try to manually edit the post in phpMyAdmin, then found out something quite interesting here. It’s not about wordpress or php at all.

Here’s the error message when i try to edit the post manually in phpMyAdmin:

MySQL Error : Got a packet bigger than ‘max_allowed_packet’  bytes


It’s something to do with the MySQL server, so after googling a little, found out it’s quite easy to fix this problem on the fly:

mysql
mysql> set global max_allowed_packet=5*1024*1024;
Query OK, 0 rows affected (0.00 sec)
(Assumming you want to set it to max 5MB / post)

If you prefer to make it permanent, you must edit /etc/my.cnf:

[mysqld]
max_allowed_packet = 5242880
(Assuming you want to set it to max 5MB / post)

Hope this could help you fixed the same problem.

WordPress problem create post above 1MB

Leave a Reply