Restrict access if logged out except for homepage

Is your “home page” displaying a list of the site’s blog posts, or is it set to display a specific page? If the latter, you need to use is_front_page() instead of is_home().

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