Run SQL Query is a simple plugin to quickly execute any type of SQL query into the WordPress's DB and export the results in a CSV format file.
As of April 2026, Run SQL Query is a WordPress sql plugin with 700 active installations and a 5/5 rating from 1 reviews. It has been downloaded 13K+ times in total. Requires WordPress 4.4+ and PHP false+. Available on WordPress.org since 2016. Last updated 9 years ago — may have compatibility concerns. Top alternative: Search & Replace.
This plugin will allow you to execute any type of SQL query into the WordPress’s DB connecting through the driver provided by the MySQLi extension without the need to use another tool like phpMyAdmin.
It also gives you the ability to export the results in a CSV format file.
In order to access this plugin’s admin page (Tools -> Run SQL Query), your account needs to have the install_plugins capability, that means a Super Admin in the multi-site installation or an Admin in a single site.
Feel free to contribute:
https://github.com/Sefirost/run-sql-query
Use on you own risk. Under no circumstances will the Author of this plugin assume responsibility or liability for any damages or destructive effects on the database resulting from the queries executed using this tool.
| WordPress | 4.4+ requiredTested up to 4.5.33 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.