Get wordpress installation folder

You don’t need to do this. As long as your site URL in Settings is set to mydomain.tld/wordpress you don’t need to include /wordpress in your rewrite rules.

If you look at the rewrite_rules option in the wp_options table you’ll see that none of the default rules are using it, because it’s not required.

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