wp_insert_post not working for custom post type?

Try add the second parameter like:

$post_id = wp_insert_post( $new_post, true );

If it still won’t work, please var_dump the $post_id and paste here.

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