I'm trying to get a connection to a separate external database from the database the wordpress site depends on. I have a PHP file inside the same location of my theme, it is basically a blank PHP it has the needed PHP tags.
I'm trying to make a connection using what I found online this is what the whole file looks like:
<?php $mydb = new wpdb('username','password','db_name','xxx.xxx.xxx'); ?>
When I try to make a connection with the correct credentials I get an error in my WPEngine Live Site Log that says:
PHP Fatal error: Class 'wpdb' not found in /nas/content/live/...
How do I go about fixing this issue, so that I can connect to my external database?