WordPress not seeing .htaccess rules

apache “AllowOverride” was set “None” but changing it to “All” made no effect
:
I changed the “AllowOverride” in the “apache2.conf” file.

It’s still not clear where exactly you are setting AllowOverride. This directive can only be used in a directory context. ie. Inside a <Directory> container in your main server or VirtualHost config.

You should already have a section like the following (which should not be changed):

<Directory "https://wordpress.stackexchange.com/">
AllowOverride None
</Directory>

The server root (ie. "https://wordpress.stackexchange.com/") must only be set to None, otherwise Apache will search for .htaccess files all the way to the server root which could result in security/performance issues.

Instead, you should override this for your document root directory only. This will probably go in your specific <VirtualHost> for your site. (Or in the main server config – after the above <Directory> container – if you only have one site configured for the whole server.) For example:

<Directory "/var/www/html">
AllowOverride All
</Directory>

Assuming /var/www/html is the absolute filesystem path of your document root, in which the .htaccess file is located.


ErrorDocument 401 /var/www/html/wp-content/themes/zerif-lite/index.php?error=404
ErrorDocument 403 /var/www/html/wp-content/themes/zerif-lite/index.php?error=404

Aside: The path specified in the ErrorDocument directive should be a URL-path relative to the document root, not the server root.


RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$

keep in mind these are going in the .htaccess in the wp-admin as instructed

The first two conditions (RewriteCond directives) imply that these should be going in the root .htaccess file, not the .htaccess file in the /wp-admin subdirectory?