How to redirect wp-admin/index.php to a custom post type?

You can use wp_redirect to do this.

function dashboard_redirect() {
    wp_redirect( admin_url( 'edit.php?post_type=customposttype' ) );
}
add_action('load-index.php', 'dashboard_redirect');

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