Using wpdb to connect to a different database is not working
I found the problem. I had defined variables using the names DB_USER, DB_PASSWORD etc in my own database connection config file. I then found that wordpress already defines variables using these exact same names, which are stored in one of the files in the wp-includes directory. So my own defined variables with the same name … Read more