WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm importing a csv file via the database, all the posts are unpublished when I look in the CMS, is there a way to make them automatically published on import?

Doing a bulk publish via the CMS doesn't work as I need the dates I've put in the CSV file to be the publish date, not the date publish was clicked.

In the post_status column, all the posts are set to publish.

I'm trying to import hundreds of posts of news and the dates need to be in the past.

Here's my csv file:

ID  post_author post_date   post_date_gmt   post_content    post_title  post_excerpt    post_status comment_status  ping_status post_password   post_name   to_ping pinged  post_modified   post_modified_gmt   post_content_filtered   post_parent guid    menu_order  post_type   post_mime_type  comment_count
6000    1   13/09/2010 00:00    13/09/2010 00:00    "Content here"  New Report Available - Taking Medical Sensing Technologies to Market        publish open    open        new-report-available-taking-medical-sensing-technologies-to-market          13/09/2010 00:00    13/09/2010 00:00        0   http://www.mediwales.com/v3/?post_type=news&p=6000 0   news        0

enter image description here

share|improve this question
Can we see the code you're using to import via MySQL? I'd imagine that the post_status simply needs to be set to publish? – dunc Apr 12 '12 at 8:56
@dunc Sorry, added to the question that the post_status is publish. – Rob Apr 12 '12 at 8:59
up vote 1 down vote accepted

Suggestions for what you can try: Try to remove the empty columns, especially post_excerpt. Try another import plugin. Try another delimiter.

share|improve this answer
I just get an invalid column count error when deleting empty columns. – Rob Apr 12 '12 at 10:15
Tried several csv plugins which don't seem to work. – Rob Apr 12 '12 at 10:21
What does the data look like in the database (after the import)? – offroff Apr 12 '12 at 10:36
It won't import because of the error. – Rob Apr 12 '12 at 10:44
You already imported some data, what does that data looks like? You can make a select * from your posts table or you can use a database tool to open up that table. – offroff Apr 12 '12 at 10:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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