WP-DB Manager is a fantastic WordPress plugin for easily doing mySQL database maintenance functions like:
1. Optimise the database (and automate this to run at intervals you specify (e.g. weekly);
2. Repair the database;
3. Empty or Drop Tables (careful with this as you can delete all your data doing this. However, there are occassions where you might want to remove date. Often when you remove a plugin and want to remove the associated data, or you have been hacked or spammed and want to remove the offending data);
4. Run SQL Queries
5. Schedule automated Backing ups of your WordPress MySQL Database. These can be emailed to youand / or stored in a db-backup folder on your server.
When you install the plugi you will notice a message in red that appears at the top of your screen on every page when you are logged into the administration area:
“Your backup folder MIGHT be visible to the public
To correct this issue, move the .htaccess file from wp-content/plugins/wp-dbmanager to /home/username/yourdomain.com/wp-content/backup-db”
Move the .htaccess file…BUT…
When you follow the instructions and move the .htaccess file (which is called htaccess.txt and you need to rename to .htaccess – remember to put the dot at the front) to the correct directory, the warning message does not disappear. That is because it is not coded in to disappear when the issue is fixed.
To remove the warning message you need to edit the wp-dbmanager.php file in the plugin directory in the wp-dbmanager folder. You need to find the following line:
and comment it out (hide it so it no longer displays). You do this by adding two forward slashes in front of the code like this:
// add_action('admin_notices', 'dbmanager_admin_notices');
…and voila, the warning message has disappeared.
Where To Find It In WordPress
The easiest way to edit the file is to go to the Plugins Menu | Editor | “Select plugin to edit:” wp-dbmanager | click on wp-dbmanager/wp-dbmanager.php and find the line to change, then click the ‘Update File‘ button.
Of course before making any changes it is always prudent to copy the entire text of the file into a text editor or notepad just in case you muck it up. If you do you can simply copy it back and start again.