Support » Installing WordPress » WordPress database error: Unknown column ‘link_count’

  • Just upgraded from wp 2.0. Had limited rights for the db (alter table was disallowed for wp db user). So after I’ve run upgrade.php, it showed me a lot of db errors regarding alter tables. Still, at the end of the page it was common message “There’s actually only one step. So if you see this, you’re done. Have fun!”

    I’ve changed db user rights and run upgrade.php again. Looks to be ok now, but shows me the following error on mainpage of blog and inside the “Write post” section:

    WordPress database error: [Unknown column 'link_count' in 'where clause']
    SELECT * FROM wp_categories WHERE cat_ID > 0 AND link_count > 0 ORDER BY cat_name ASC

Viewing 5 replies - 1 through 5 (of 5 total)
  • Frank McClung

    (@fivemcclungs)

    I’m having the exact same issue with an upgrade from 2.0 to 2.1.1., only I get the error in the categories tab under write post:

    WordPress database error: [`Unknown column ‘link_count’ in ‘where clause’]
    SELECT cat_ID FROM wp_categories WHERE category_parent = 0 AND ( link_count = 0 OR category_count != 0 OR ( link_count = 0 AND category_count = 0 ) ) ORDER BY category_count DESC
    `

    Could someone please help.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    If you get that message, then your database did not upgrade properly. I recommend restoring from a backup and trying the upgrade again.

    Did that – restored. SAME RESULT!!!!!!

    kshipp–may want to continue this on the other thread you commented on http://wordpress.org/support/topic/115353

    I had this same error till I saw that we are supposed to run the wp-admin/upgrade.php program (it is in the upgrade directions of the readme.html)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress database error: Unknown column ‘link_count’’ is closed to new replies.