Available in: Pro
The Custom Database Table data type connects tables in your WordPress database that use your site’s table prefix (for example wp_) to Google Sheets, in either direction. Tables that WordPress, WooCommerce or PushRow manage, or that hold private data, are left out; see Protected tables below.
Export
Choose the table, and PushRow loads its columns as fields. Scheduled runs keep the sheet up to date. Real-time sync isn’t available for tables, because WordPress has no events for direct table changes.
Import
Import jobs write sheet rows into a table. Settings:
- Database table and unique key column (the primary key is detected automatically).
- On duplicate key: what to do when a row already exists.
- Clear table before import.
- Delete rows when removed from sheet.
Imports write directly to the database. Back up the table before the first run, and start with a test run.
Protected tables
Because this data type reads and writes tables directly, some tables are not listed:
- Imports leave out WordPress core tables (posts, users, options and the rest), WooCommerce and Action Scheduler tables, and PushRow’s own tables. To import into posts, users or WooCommerce data, use their own data types.
- Exports leave out tables that hold passwords, sessions or API keys: users, user meta, options, WooCommerce API keys, webhooks, payment tokens and sessions, and PushRow’s own tables. Other core and WooCommerce tables can be exported.
- On multisite, each site lists only its own tables.
- A job that points at a protected table stops with an error that explains why.
Developers can allow or block a table with the pushrow_pro_db_table_allowed filter.