dynamic site link for future migration in echo do_shortcode()

You can save your website’s URL into a variable and pass it to the shortcode:

$url = site_url();

echo do_shortcode("[timeline src="https://wordpress.stackexchange.com/questions/284281/$url/rest-of-the-url/"]");

You should also be able to use your shortcode in the following way:

echo do_shortcode("[timeline src="".site_url()."/rest-of-the-url/"]");

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