Taking admin-ajax.php out of admin folder

  1. garfield.ir

    Please take admin-ajax.php file out of wp-admin folder or at least add a frontend version on root folder, so we can add password to wp-admin folder easily using our webserver.

    Posted: 2 years ago #
  2. Gerkin


    +1, even if it's already possible with a well configured web-server

    Posted: 2 years ago #
  3. saturdev

    What do you mean with "a well configured" web-server. Two things that come into mind would be symlinks or rewrites (htaccess) to the admin-ajax file from outside. Not sure if the rewrite would work though, because the folder protection would also be added in the .htaccess file. Maybe depends on the order. As for the symlink, I'm pretty sure this should work. What about file dependencies from within the admin-ajax.php then? Will they still work?

    But yeah, also +1 from me, it is totally viable to use it for frontend ajax stuff as much as within the admin section (to be honest, I think I use it for fronted stuff most of the time)

    Posted: 2 years ago #
  4. garfield.ir

    I create a ajax.php in my root folder, and then i require the admin-ajax.php file inside it. that does the job, but all other plugins do as wordpres does and call wp-admin/admin-ajax.php when they need ajax calls. so it makes what I do pointless.

    Posted: 2 years ago #
  5. ibes

    A real solution would be to enable plugin authors to use Ajax without pointing to admin-ajax.php

    It is a often used way to make ajax calls through admin-ajax.php - but it is bad design.

    Frontend stuff shouldn't need to access backend stuff.
    And most ajax calls don't need the whole WordPress to be loaded (which is done at calling admin-ajax.php) but just need a simple answer. So don't load every plugin etc.

    Posted: 2 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    3 Votes
  • Status

    This idea is under consideration