Fix for WP-DBManager Error Warning: Your backup folder MIGHT be visible to the public
Recently, an upgrade to the WP-DBManager plug-in for WordPress started giving an error message on my sites. The error message is, "Error Warning: Your backup folder MIGHT be visible to the public". The plug-in goes on to recommend that you copy the .htaccess file from one folder to another.
There are two glitches with the WP-DBManager WordPress plug-in.
The first is that there is no .htaccess file where WP-DBManager says to look. It is an easy solution, on the support forums, the author notes that there are some difficulties distributing the plug-in with a real .htaccess file in it. To get around the issue, there is a htaccess.txt file instead. Just copy it to the new directory and then rename it .htaccess. All of which is easily done with Filezilla or another FTP utility.
The second glitch is a little trickier.
Even after you have copied the .htaccess file where you are supposed to, the plug-in might show the error message anyway. In other words, you still keep getting the error even if you have the right .htaccess file in the correct directory.
On the support forums, there is information to make the Warning message go away. It involves how to tweak the plug-in’s PHP code, but all this does is stop the check. It doesn’t fix the problem. That is bad news, because if the error message is broken your backups might be broken too.
WP-DBManager Error and Dreamhost Hosting
For whatever reason, Dreamhost hosts their accounts for WordPress and other sites with a full directory path that includes a ".something" directory. WP-DBManager requires a path to mysquldump and mysql, but also the FULL directory path structure to work properly.
As a Dreamhost user, that means that you will input a Path to Backup containing a ".".
For example, /home/.swami/domain.com/wp-content/backup-db
Whether it is a Dreamhost thing or a WordPress thing, I don’t have any idea, but for whatever reason, when the WP-DBManager plugin code tries to read the Path to Backup field it uses the /.swami/ part correctly in one section, but then does NOT use it correctly in the next section.
Keep getting the Warning: Your backup folder MIGHT be visible to the public error message even though you have the right .htaccess file because the check the plug-in makes fails due to have the "wrong" path.
Even worse is that your backups are failing! The same path error that causes the warning to falsely display causes a directory write error when it tries to run the backups!
How To Fix WP-DBManager WordPress Plug-in Error Message
Fortunately, the fix is pretty easy.
Go into the DB Options under Database in your WordPress control panel and change the Path to Backup to NOT include the .directory whatever it is.
In the example above, delete the /.swami/ part of the path.
That leaves /home/domain.com/wp-content/backup-db.
Save the changes and then click on a different plug-in or control panel option and then back on the Database (to get it to re-try and read the file). The error message should disappear, and more importantly, your backups should be working again.
You can test if WP-DBManager backups are working by clicking Backup DB which runs a manual backup.
By the way, Dreamhost already backs up your mysql databases for you, so if you are in a pinch you can use those. But, WP-DBManager still provides more robust, automated backups, that are not overwritten by default and are easier to restore, so you still need the plugin.