I need to get username, password etc from the wp-config file to connect to a custom PDO database.
wp-config
Currently I have another file where I have this info, but
Just add required wp-load.php file. you can use all wordpress functionality like get_recent_posts() and many more...