• I protect the wp-admin folder with at .htacces and .htpasswd files. When activating the WordPress Popular Posts plugin the authorizaton box pops up all the time for every visitor on all pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I see. The problem is that when you block your wp-admin directory like this, no script can access it without authentication. At the moment, I got no suggestions for you since this is something that my plugin can’t handle.

    I’ll keep this issue in mind and search for alternatives so you can use my plugin, however I can’t promise anything. If you know any workaround for this I’ll be happy to hear it.

    Question: does this problem appears all the time no matter what options are configured? Or just when you activate the thumbnail feature?

    Thread Starter gavekort

    (@gavekort)

    I just activate the script and the problem appears. Not even using a widget. So I haven’t configured any options yet. I’ll look in to it later.

    Does the script need to access the wp-admin directory? First time I’ve had any problems and I’m using WP on 10+ websites with a lot of plugins.

    Yes, it does. My plugin uses WordPress’ Ajax API to update to the database in real-time, and to do so it requires access to a file called “admin-ajax.php” located in wp-admin.

    The problem is that when my plungin tries to access to it your .htaccess directives are blocking it, and that’s why you and your visitors are being prompted for credentials. This is the first time someone notifies me about this issue.

    I’m already searching for workarounds to fix this. Hopefully, I’ll find one that suits both of our needs without too much hassle.

    Hey there,

    After reading a lot, it seems to be impossible to access a password protected folder from any script (which is good, that should not be allowed anyways). Hence, keeping your current .htaccess configuration will make it impossible to use my plugin on your site.

    However, I found an alternative that works with my plugin: use the Deny from all apache directive. With it, you can still block unauthorized access to your wp-admin folder. Here’s an example of what your htaccess file should look like:

    order deny, allow
    deny from all
    allow from 12.34.56.78

    Wherein 12.34.56.78 is your IP (you can find your IP here: https://www.whatsmyip.org/). The Deny from all directive keeps everyone from accesing your wp-admin folder. The allow from directive tells the server that requests from the given IP address should be served.

    Sorry that I cannot help you any further with this. Hope that helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WordPress Popular Posts] Not working when protecting wp-admin with htaccess’ is closed to new replies.