2

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?

1
  • any idea ?i really need help
    – boranb
    Nov 20, 2011 at 0:27

4 Answers 4

1

Weird.. Have you checked the database on your own?

  1. Are you in the administrator group? Get your user id from the {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 to 10.
  2. Do you have migrated the database from another wordpress installation? If it's really an autoincrement problem, you could use a db tool (e.g. phpMyAdmin) to set the 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 the Structure tab and edit the ID column. There you can enable/disable the AUTO_INCREMENT attribute for this column. Another approach is to export the hole database with the Add AUTO_INCREMENT value selected, delete and re-import the database.
0
3

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.

0

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.

0

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 MODIFY ID bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=421;

421: can change to other number, ensure it's higher than last post id

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.