How to synchronize The Loop with the max post per page?

You can retrieve the setting for posts per page set under Settings > Reading via get_option:

$posts_per_page = get_option( 'posts_per_page' );

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