How to replace the default domain on wp get shortlink

You can filter the link returned by wp_get_shortlink() using get_shortlink filter.

add_filter( 'get_shortlink', 'cyb_replace_domain_shortlink' );
function cyb_replace_domain_shortlink( $shortlink ) {
    return str_replace( 'mydomain.com', 'myalternatedomain.com', $shortlink );
}

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