0

I have a handful of custom database commands that my admin users need to execute on an adhoc basis - it's some business logic that was unavailable in a normal plugin. The commands are all procedures that either execute successfully, or return a record set.

I want to be able to make these commands available through the Wordpress admin interface, ideally saving each query with a friendly name (eg Process1 - start of day) so that it is easier to execute but I haven't been able to find a solution. The admin users are slightly horrified by the likes of PHPMyAdmin for Wordpress, or even using SSH to get to a Bash menu script which executes database commands when options are selected.

1 Answer 1

2

I don't know of a plugin that allows you to do this out of the box, but as you are (/seem to be) comfortable with database manipulation, I've outlined below how you can achieve what you want using custom coding.

You can run custom queries using the wpdb-class. There are a few posts on WPSE/SO that treat this. Once you've set those up, you can run them on, for example, a custom admin page (a new page in the Wordpress Dashboard). There are various tutorials available online (such as this one) that show how that can be done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.