I have a strange problem where I import a lot of posts from an external source and also a lot of attachments for each post. Over time this has led to the situation where WordPress will not allow me to manually add a new page using Pages -> Add New…
After a lot of investigation (and trying all the usual tricks like changing themes, clearing plugins, adding admin users etc.) I was able to reproduce the issue by creating a fresh installation of WordPress and manually adding a post using phpMyAdmin with an id of 2147537784. Hey presto, WordPress will not allow the creation of a new page, instead of the publish button I will see a “Submit for Review” button which does not itself in fact work either. An attempt to submit for review will simply redirect me to /wp-admin/edit.php.
Does anybody have any idea why? I am thinking that it could be to do with the integer type used somewhere in WordPress being overflowed or something? Any help at all would be appreciated.
If the autoincrement id is of type unsigned integer, it’s upper bound is 2,147,483,647. You overshoot it with 2,147,537,784. I don’t know how mysql handles it, maybe the id was set to 2,147,483,647 or it overflowed, but the result is, the autoincrement is unusable and won’t give you any more values.
You can change the id column to unsigned bigint to get higher values.