After wp_insert_post() custom post type does not show in the admin

The problem was that the import script had post_status as ‘published’ not ‘publish’ hope this helps someone. :facepalm

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)