I have installed WordPress on my linode vps and it was running without a problem till today.
Today I realized I dont have admin rights to post a page in wp-admin. It doesn’t show me submit button, it shows me “submit for review” button instead. It is very odd because I am logged in with admin account and for example I can use theme editor, edit styles etc. I googled it and found something about “auto increment on primary keys are gone”.
What do you think?
Weird.. Have you checked the database on your own?
{tableprefix}_users
table and search for the coresponding meta key{tableprefix}_user_level
for your user id inside the{tableprefix}_usermeta
table. The value should be set to10
.AUTO_INCREMENT
attribute. I haven’t tested this, so please make a database backup before and use a testsystem. Open your database, select a table (e.g.{tableprefix}_posts
), click theStructure
tab and edit theID
column. There you can enable/disable theAUTO_INCREMENT
attribute for this column. Another approach is to export the hole database with theAdd AUTO_INCREMENT value
selected, delete and re-import the database.Got stuck with this problem with one of our websites after we used the tumblr import tool. The tool did not import the blog successfully and also introduced this problem.
I fixed this by removing the auto-draft posts post with a very large id something above 2billion in my case and reseting the auto-increment to something like 2000 depending on how many rows you had before in the wp-posts table.
That should do it.
I had this problem after forklifting data into the wp_posts table. I had explicitly set the primary key value (ID field in wp_posts) and now the autoincrement was set to start at somewhere north of a billion (loading a book’s ISBN as the ID).
To fix, I culled the data and then did an alter table and set the autoincrement appropriately.
I just got this issue on my wordpress site.
I compared staging db and live db then got an interested thing: the auto increment index is missing in configuration of wp_posts table. That why we can’t publish post, page or portfolio.
Below are sql query to update value for auto increment of posts table.
ALTER TABLE
wp_posts
MODIFYID
bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=421;421: can change to other number, ensure it’s higher than last post id