Integrating Custom Database with WordPress

You can use wpdb class to query your custom data from MySQL. Depending on your implementation you would either use:

  • global $wpdb object, if your custom data is in same database as WP itself
  • new custom instance of wpdb class if you need to connect to different database for custom data

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