Denied "access /wp-admin/admin-ajax.php" (htaccess) …


I cannot log into my website anymore, receiving the following message:

"You don't have permission to access /wp-admin/admin-ajax.php on this server. Server unable to read htaccess file, denying access to be safe. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."

The last actions I did before this were : 1) running snaphot backups and 2) upgrading my hosting from "shared" to "virtual private server" …

Also, some weeks back, I had uploaded an .htaccess file with the code to establish a multi-site network (as I could not find one) … thinking now that this might be the problem though it was actually working fine so far …

Trying to fix the .htaccess, I can view the files in my CPanel, File Manager (Search) but double-clicking, it would not open … see attached screen.

Many thanks in advance for your help, Elisabeth

  • Predrag Dubajic
    • Support

    Hi Elisabeth,

    Have you tried renaming your wp-content/plugins/ folder and renaming it so your plugins get deactivated and see if something from there is causing this?

    Also, can you try deleting your .htaccess file completely (create a backup first) and try to access your admin section after that?

    Let us know if any of those help or if we need to check other things here.

    Best regards,


  • Elisabeth T.
    • New Recruit

    Hi Predrag,

    Yes, the plugins folder is renamed and the .htaccess file now deleted from wp-content.

    I still see a number of .htaccess files in subfolders like under uploads – snapshots – logs … do I have to delete them too ?

    In wp-admin permissions are set 755 and 644; and I had also checked with my hosting provider that there was nothing “unsual” with the upgrade …

    Kind regards, Elisabeth

  • Adam Czajczyk
    • Support Gorilla

    Hello Elisabeth,

    Did you or do you have Defender or other kind of security plugin installed on the site?

    If yes, those .htaccess files might be important here. I think you might try removing (or just renaming to something like “”:wink: those .htaccess files in “/wp-content/” and “wp-includes” folder.

    I’m not sure how yoru site is built/configured but it’s possible thet there are some rules that are actually preventing php executions and in this case affecting admin-ajax.php calls.

    If you have “.htaccess” file inside the “/wp-admin” folder, do the same there too. Other shouldn’t in theory block that access.

    Keep us updated please.

    Best regards,


  • Elisabeth T.
    • New Recruit

    Hi Adam,

    I now have renamed all htaccess files and all plugins folders that I could find … but unfortunately, still getting the same message …

    I have no security specific plugins … though some of the most recent plugins were membership, login and multisite user management plugins … was configuring these plugins, ran backup and upgraded hosting account … and the next day I could not logged in anymore …

    Many thanks, Elisabeth

  • Predrag Dubajic
    • Support

    Hi Elisabeth,

    Could you provide us with your cPanel login details so we can see if we can figure out what’s going on from there?

    You can send us your details using our contact form and the template below:

    Subject: “Attn: Predrag Dubajic

    – Site login url

    – WordPress admin username

    – WordPress admin password

    – cPanel credentials (host/username/password)

    – Link back to this thread for reference

    – Any other relevant urls

    Best regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.