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