WordPress Error: Unknown column ‘post_category’ in ‘field list’

by on Oct.24, 2012, under Linux, Web Development

I wanted to move one WordPress installation from one server to another. Therefore I began with a clean WordPress and tried to import the wp_posts table via sql:

wordpress@t30700:~/public_html/dev/blog$ mysql -u wordpress -p*PASSWORD* --database=wp_blog < wp_blog.sql


ERROR 1054 (42S22) at line 2: Unknown column 'post_category' in 'field list'
ERROR 1054 (42S22) at line 2: Unknown column 'robotsmeta' in 'field list'

The solution

Add the missing collumns by hand…

  1. Log in to your phpmyadmin interface
  2. Select your wp_posts table and view the structure.
    At the bottom “Add column(s) After: ‘post_title’” -> Click GO
    Name: post_category Type: int(4) NOT NULL DEFAULT ’0′
  3. Again “Add column(s) At End of Table” -> Click GO
    Name: robotsmeta Type: varchar(64)

That’s it. It’s no possible to import the (outdated) SQL dump and ruin your freshly installed, clean wordpress. ;)

Feel free to comment if you need any help!

Incoming search terms:

:, , , , ,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!