Exports and Reports
v1.2.8Scott Kingsley Clark · 2010年7月8日 上架
Define custom exports / reports for users, based off of any custom MySQL SELECT query you define.
- 正在使用
- 400+
- 评分
- 4.7 / 5
- 累计下载
- 3.7 万
- 最近更新
- 2026年11月24日
截图








Define custom exports / reports for users, based off of any MySQL SELECT query you create. This plugin interacts with your SELECT query and does all the hard work for you: exporting, pagination, ordering, searching/filtering, and display formatting for you.
All you do is install the plugin, create your Groups, create your Reports, and hand it off to your clients. Exportable reports in CSV, TSV, pipe-separated TXT, XLSX, XML, JSON and PDF, from the admin screens or through the REST API with a token, for cronjobs.
Requires PHP 7.2 and WordPress 5.7 or later. PDF exports render with tc-lib-pdf on PHP 8.2 and later and with TCPDF below that.
Report queries are written by administrators and run as written: only users with the plugin’s settings capability (administrators by default) can create or edit a report. The plugin adds its paging, sorting and filters around the query, with every request value passed as a prepared placeholder and the sort column checked against the report’s columns; readers of a report cannot change its SQL.
Please submit bug reports or contribute your own enhancements/fixes on GitHub.
Features
Administration
- Create and Manage Groups
- Create and Manage Reports
- Limit which User Roles have access to a Group or Report
- Ability to clear entire export directory (based on logged export files)
- Daily Export Cleanup via wp_cron
- The export directory is not served by the web server; downloads go through the plugin after an access check
- Deletes its tables, options and export files on uninstall
- WP Admin UI – A class for plugins to manage data using the WordPress UI appearance
Reporting
- Filter by Date
- Automatic Pagination, with the row count kept for a while on slow reports
- Show only the fields you want to show; the field editor detects them from the query
- Pre-display modification through custom defined function per field or row
Exporting
- CSV – Comma-separated Values (w/ Excel support)
- TSV – Tab-separated Values (w/ Excel support)
- TXT – Pipe-separated Values (w/ Excel support)
- XLSX – Excel format, using PHP_XLSXWriter
- XML – XML 1.0 UTF-8 data
- JSON – JSON format
- PDF – PDF printer friendly views, using tc-lib-pdf on PHP 8.2 and later and TCPDF below that
REST API / Cronjob
- Run the Export action for a specific report to any supported export type, and download the file
- Get paginated / full data from a report in JSON format
- Routes under /wp-json/exports-reports/v1/reports/ID/ (data, export, exports/FILE), for a logged-in user who may view the report or for the API token from the Settings page, sent as “Authorization: Bearer TOKEN” or as ?token=; the header keeps the token out of URLs and server logs; the Settings page shows the URLs. The token is stored as a hash and shown once, when it is generated