At the heart of your WordPress site is a MySQL database. It stores most of the information that your site uses to populate and structure pages. For the most part, you’ll never need to interact directly with the database outside of the confines of the WordPress admin dashboard. For novice users, that’s an advantage, because unless you have some experience of how relational databases in general and SQL databases in particular work, there’s considerable potential to inadvertently change something that will prevent that site from functioning properly.
But, for more advanced users, direct access to the records and tables of the database can be useful. Most good web hosts provide access to MySQL databases via their control panel, often using the phpMyAdmin application, but, for users who frequently fiddle with their databases, it can be handy to have direct access to some functionality from within the dashboard.
We’re going to have a look at 5 WordPress plugins that are useful for accessing, querying, modifying, and exporting from MySQL databases from within WordPress.
Portable phpMyAdmin is, as the name would suggest, a plugin that brings most of the functionality of PHP MySQL into the dashboard. With it, you can do almost anything you might want to do to a MySQL database, including managing tables, fields, relations, users, and permissions. You can also execute your own SQL statements.
This is a very powerful tool. If you aren’t a relatively advanced MySQL user, you should take a great deal of care. It would be very easy to break your database.
ELI’s SQL Admin
This is a nifty plugin that allows users to run arbitrary SQL and display the results as a report on the WordPress dashboard. It also includes a number of shortcodes for putting the output onto selected pages and posts.
Search and Replace
It’s sometimes desirable to make en masse changes to database records. For example, you may want to mass edit the metadata of your posts. This can be a pain if you have to do it by visiting and editing each page in turn. This plugin can search for various strings in the WordPress database, including ID, post content, title, comments, authors, tags and categories, and replace them with a string of your choice.
WP Clean Up
Over time, the WordPress database can become cluttered with unnecessary data, like post revisions and drafts, moderated comments, spam, and so on. The extraneous content can bloat the database, so a periodic cleanup is a great way to save some space on your hosting plan. WP Cleanup lets you remove the redundant database records quickly without having to tangle with phpMyAdmin.
myRepono WordPress Backup Plugin
Keeping adequate backups is the single most important interaction that a WordPress site owner has with their database. As I said at the start of this article, for the most part, the database is the site, and without it, there is no way to rebuild. This plugin will take care of backing up your site’s database to myRepono’s remote servers. It’s a paid service, but it’s fairly inexpensive and if you ever lose your site’s database, you’ll be very glad of the backup.
If you have a favorite WordPress plugin for interacting with the MySQL database, feel free to give it a shot in the comments.