How to return site_url() without https://

Try below method

$site_url = site_url();
$url = preg_replace("(^https?://)", "", $site_url );
return $url;

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