6

I upgraded a client's WordPress from 2.8 to 3.0.1 and after upgrading I am now receiving this message in the dashboard:

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/usearname/public_html/wp-content/backup-db

My client's WordPress in installed in the /wordpress/ sub-directory, i.e.:

http://domain-name.com/wordpress/

This was provided by the plugin to resolve the problem (the filename is wp-content/plugins/wp-dbmanager/htaccess.txt):

<Files ~ ".*\..*">
order allow,deny
deny from all
</Files>

I downloaded this file on my PC then re-uploaded to the server at:

/home/usearname/public_html/wp-content/backup-db/

but warning message is still showing in the dashbord. How do I solve this problem?

5 Answers 5

7

gear-solid**:

Looking in the Source Code...

Here's the function from WP-DBManager Plugin that generates that error:

function dbmanager_admin_notices() {
  $backup_options = get_option('dbmanager_options');
  if(!@file_exists($backup_options['path'].'/.htaccess')) {
    echo '<div class="error" style="text-align: center;"><p style="color: red; font-size: 14px; font-weight: bold;">'.__('Your backup folder MIGHT be visible to the public', 'wp-postratings').'</p><p>'.sprintf(__('To correct this issue, move the <strong>.htaccess</strong> file from <strong>wp-content/plugins/wp-dbmanager</strong> to <strong>%s</strong>', 'wp-postratings'), $backup_options['path']).'</p></div>';
  }
}

Check the Source of the Error (pun intended...)

The key test is:

file_exists($backup_options['path'].'/.htaccess')

So your Problem is...?

Reading the test above tells me your problem is either one of these two:

  1. You uploaded .htaccess.txt without removing the .txt extension , or

  2. The plugin is configured to back up into a different directory and thus you uploaded the file to the wrong place.

Finding the Backup Directory

If the latter, you can find the backup directory (after substituting your domain for example.com) here:

http://example.com/wp-admin/admin.php?page=wp-dbmanager/wp-dbmanager.php

Here's a screenshot the admin console page where you can find that option:

Database Options Page for WP-DBManager Plugin for WordPress

Of course another option would be to disable the plugin and use something else to back up the site, assuming that's an option.

My Guess on What's Wrong?

If I had to bet I'd lay money on the likelihood you didn't realize you needed to remove the .txt extension because the plugin just assumes users would know to remove the extension and thus doesn't explicitly state to do so. If the user is already familiar with .htaccess file then it's a no-brainer; for everyone else it's greek!

7
  • I forgot to add i renamed htaccess.txt to .htaccess then i uploaded. so that is not a reason of problem. Commented Aug 30, 2010 at 5:33
  • 2
    @meta-gear-solid - Good thing I didn't actually bet? :) Hopefully it will be reason #2. BTW, I write this answers as much for other people who might google and find in the future as for the person asking the question. That way my efforts can hopefully help a lot more people. Commented Aug 30, 2010 at 6:12
  • You wrote and explained answer so well. I appreciate your efforts. Commented Aug 30, 2010 at 6:24
  • @metal-gear-solid Glad I can (attempt to) help. Hope to you can solve it. Commented Aug 30, 2010 at 6:28
  • Still message showing Commented Aug 31, 2010 at 4:11
3

My bet ? You said your client's wordpress is installed on

http://domain-name.com/wordpress/

but you've uploaded the .htaccess to

/home/usearname/public_html/wp-content/backup-db/

I think the right path is:

/home/usearname/public_html/wordpress/wp-content/backup-db/
2
  • Probably. Commented Aug 30, 2010 at 6:27
  • is it usearname (sic) or username? (the funny thing is that the usearname DOES bring page to the top of Google... anyway in case of copy and pasting the path in there...
    – edelwater
    Commented Nov 14, 2010 at 23:05
3

the reason the .htaccess is not in the zip file is that WordPress' svn does not allow it to be in the zip file... For the message:

Threads

See: http://wordpress.org/support/topic/db-backup-folder-visible-to-the-public?replies=36#post-1157221 for the thread, for me, back then it was the wrong path. (see also http://forums.lesterchan.net/index.php?topic=3714.0)

for Dreamhost:

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. (http://besthubris.com/computers-internet/fix-wp-dbmanager-error-warning-your-backup-folder-might-be-visible-to-the-public/)

2

Did you remove (i.e. delete) /home/usearname/public_html/wordpress/plugins/wp-dbmanager/.htaccess?

If it's still there, even if you've copied it to /home/usearname/public_html/wordpress/wp-content/backup-db/, you're going to get that error message.

So:

  1. Ensure /home/usearname/public_html/wordpress/wp-content/backup-db/.htaccess exists
  2. Ensure /home/usearname/public_html/wordpress/plugins/wp-dbmanager/.htaccess does not exist
2

here's what fixed the error for me...apparently when I moved the .htaccess.txt file, I did delete the .txt extension, but somehow the "." at the front of the file name also got deleted so I wound up with just htaccess and no preceeding "." at the front of the file name like it should have...so:

This is wrong obviously -----> htaccess <--- no dot at beginning of file name

This is correct -------> .htaccess <----note the dot/decimal point at beginning of file name. Once I added the preceding dot, the warning message disappeared. Hope that helps.

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