How to replace part of shortlink with nothing

You want to replace a string within the result, you’ve got it in the function’s arguments. Nothing WordPress-specific here.

$post_url = str_replace( 'http://', '', wp_get_shortlink() );

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