Solve a "Submit For Review" issue on WordPress

       300 words, 2 minutes

Lately, I couldn’t publish any more articles on my WordPress instance. Instead of the “Publish” button, I only got “Submit For Review”. As I upgraded WordPress recently, I thought this might be either a new feature or some permissions that were dropped ; but I just couldn’t find any.

After a few dig&read on the Internet, most of this behavior seemed to reveal a problem with the database. And I recently had a few bunch of crashes on the infrastructure ; thanks to my electric power provider…

So I logged on the MySQL server and issue a few commands to check and repair the database:

# mysqlcheck -A -u root -p
Enter password: xxxxxxxxxxxxxxxxxxxx
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
(...)
wp.wp_commentmeta
warning  : 9 clients are using or haven't closed the table properly
status   : OK
wp.wp_comments
warning  : 3 clients are using or haven't closed the table properly
status   : OK
wp.wp_links                                     OK
wp.wp_options
warning  : 9 clients are using or haven't closed the table properly
status   : OK
wp.wp_postmeta
warning  : 14 clients are using or haven't closed the table properly
status   : OK
wp.wp_posts
warning  : Table is marked as crashed
warning  : 6 clients are using or haven't closed the table properly
error    : Found 1461 keys of 1460
error    : Corrupt
wp.wp_slim_browsers                             OK
(...)

# mysqlcheck -A --auto-repair -u root -p
Enter password: xxxxxxxxxxxxxxxxxxxx
(...)
wp.wp_links                                     OK
wp.wp_options                                   OK
wp.wp_postmeta                                  OK
wp.wp_posts
warning  : Table is marked as crashed
warning  : 6 clients are using or haven't closed the table properly
error    : Found 1461 keys of 1460
error    : Corrupt
wp.wp_slim_browsers                             OK
(...)
Repairing tables
wp.wp_posts                                     OK

# /etc/rc.d/mysqld restart                                                               
mysqld(ok)
mysqld(ok)

Once the DB was repaired, I got the “Publish” button back and could post new articles as this one.