The remote connection wizard is part of our premium data services and allows premium users to make heterogeneous external data sources available to their WordPress back-end and front-end. Two types of remote data sources are supported:
- Remote database connections
- Remote data files (no programming skills or database knowledge required)
Remote database connections #
Remote database connections are supported for the following database management systems:
- MariaDB | MySQL
- Microsoft SQL Server
- PostgreSQL
- Oracle
- Microsoft Access (handled as a remote data file)
The remote database needs to be accessible from our data server. Data is not cached or replicated on our server (only Microsoft Access files are cached).
Remote data files #
The following file types are supported:
- Microsoft Access MDB
- Microsoft Access ACCDB
- CSV file
- JSON file
- XML file
Remote data files need to be accessible via a public URL. The remote file is loaded (cached) onto our data server and imported into our database. A database table is created automatically and requires zero configuration. A refresh interval can be defined per remote data file, which reloads the data file and updates the database table automatically.
Setup #
Usage #
Plugin tools #
Tables created from a remote database connection or remote data file, are available to all WP Data Access tools. Just select your table to create a publication, project or chart as you would do with a table stored in your WordPress database.
Custom PHP code #
Tables can be accessed from PHP code as well. Here is a template:
<?php
function heterogeneous_connection_example() {
$wpdadb = WPDataAccess\Connection\WPDADB::get_db_connection( 'rdb:wpdafree.youniquedata.com' );
$rows = $wpdadb->get_results( 'select * from my_table' );
foreach ( $rows as $row ) {
// Process table row...
}
}
add_action('plugins_loaded', 'heterogeneous_connection_example');
?>
The code example above connects to remote database rdb:wpdafree.youniquedata.com. Class WPDADB is a sub class of WordPress class wpdb. If you are fimiliar with the wpdb class you can easily use wpdb method like query, get_results, insert, update, delete, and so on, to access your remote data.
Hello,
We purchased the premium version of the WP Data Access plugin and connected to the Mssql server. We can pull tables from the remote database, but can we write new data to the remote database via the plugin?
We would like to transfer data from a remote database to a different database installed on the Website. Can you help us with this? We are waiting for your support, thank you in advance.
Hi Mustafa,
If you’re connected to your remote database using our PDS service, your tables will be recreated on our server without a primary key.
Remote primary keys are not recognized automatically. You must add a primary key to enable transactions (you can use the Query Builder or Data Designer).
Hope that helps! Let us know if you have more questions.