When I try to make a backup of my wordpress website through plugin I recieve the following error:
"403 Forbidden - You don't have permission to access /wp-admin/admin-ajax.php on this server."
This error also appears sometimes during installation of plugins.
My htaccess file:
# Begin Wordpress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Structure of Server:
-/ -/wordpress -/oldfiles -/other inside /wordpress my entire wordpress website exists as:
-/wordpress -/wp-admin -/wp-content -/.htaccess etc etc.....
Things I've tried:
-Used different plugins for backup (1 Updraft, 2 Duplicator) both show the same error.
-Change file permissions from ftp client.
Set 755 permission to wp-admin, wp-includes, wp-content directories
Set 644 to all files inside the directories and 755 to all the sub-folders.
-I even changed the folder permission of /wp-admin to 755 and admin-ajax.php to 777 but still getting the same error
-Made modification in .htaccess file as follows:
# BEGIN WordPress <Files admin-ajax.php> Order Deny,Allow Deny from all Allow from all </Files> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress -Disabled all plugins and enabled only the backup creating plugins, same error.
-Deleted .htaccess file
-Made a temporary 301 redirect in .htaccess file to be sure I was working on the right .htaccess file
-Disabled "Wordfence security" plugin
/wordpresssubdirectory, the WordPress.htaccessfile appears to load/index.phpin the document root? The error msg that you stated also references/wp-admin/....in the document root?/wp-admin/admin-ajax.php(or/wordpress/wp-admin/admin-ajax.php) directly? What about the file's "group"? I would check if there are any Apache security modules that might be interfering: mod_security, mod_evasive, etc.?.htaccessfile that rewrites the request directly to/wordpress/index.php? That maybe so, but it doesn't make the/wordpress/.htaccessfile correct - either there would seem to be an additional / unnecessary rewrite going on here or the front-controller in/wordpress/.htaccessis being bypassed? (Would need to see the parent.htaccessfile to know for sure how your WP URLs are being routed.) Although this is unlikely to have anything to do with your "permissions" issue.