SQL queries to another wordpress site
Putting an important credentials in functions.php is not a good idea. The better way is you can utilize WP REST API from your second site to handle GET and POST method for the data and using global $wpdb variable inside the code. You can either create a custom endpoint for that by making a custom … Read more