Two days ago, out of nowhere, a specific table in WordPress in hongkiat.com was broken. The ‘wp_comments‘table of WordPress database just crashed with no sign, warning nor error message. So how do I know? Here are the symptoms:
- If you try to backup your database you will be thrown this error message – wp_comments is marked as broken and should be fixed using LOCK TABLES
- Recent comments widget appears blank.
- The top comment widget appears blank.
- Comments posted will not be written to the DB, so will not be displayed.
- The comment section in WP Admin doesn’t seem to have a profile.
After searching the Internet high and low hoping to find similar cases to help me identify and fix the problem, I ended up with nothing. So I tried it my way and luckily I managed to solve it. I think writing this entry will not only help those who suffer from this, but will also keep myself reminded just in case I encounter this error again in the future.
How to fix
To fix this, you must have access to the wordpress database, either through PhpMyAdmin or Secure Shell (SSH). Most shared hosting accounts come with phpMyAdmin, but either option you should be extremely careful since you deal with databases. Any wrong move will cause more data loss.
In PhpMyadmin, select the WordPress database and look for the error table. In my case, ‘wp_comments‘ table. Check it out and scroll down and search for ‘With option‘ drop the box. Select Repair table and everything will be fine.
- Sign in to your shell
- Type ‘mysql -u user name -p database name‘to access the database
- Type ‘show database;’ to view all databases
- Enter ‘use database_name;‘to join the database
- Enter ‘display table;‘to show all the tables in the database
- Enter ‘check the table wordpress_table_name‘to verify this is the broken board
- Fix it with ‘fix table wordpress_table_name‘
- Enter ‘check the table wordpress_table_name‘again to make sure it’s fixed
Steps 3 and 5 are not necessary if you are familiar with your database and tables. Hope this is useful.
Last, Ched All sent you details about the topic “Unexpected WordPress database table error [Sửa lỗi WordPress] / WordPress
❤️️”.Hope with useful information that the article “Unexpected WordPress database table error [Sửa lỗi WordPress] / WordPress
” It will help readers to be more interested in “Unexpected WordPress database table error [Sửa lỗi WordPress] / WordPress
[ ❤️️❤️️ ]”.
Posts “Unexpected WordPress database table error [Sửa lỗi WordPress] / WordPress
” posted by on 2023-01-17 07:25:54. Thank you for reading the article at Chedall.com