Using wp config to connect to a DB from a plugin
I’m guessing this is a custom “plugin” where you are wanting to run a file externally that connects to the WordPress database, not really as a standard plugin which loads within WordPress environment, as in that case as @belinus says you can just use $wpdb class. Anyway, since ABSPATH is defined IN wp-config.php, you can’t … Read more