Htaccess file screenshot

HTACCESS file is located at the root of your WordPress installation. That means the “.htaccess” file lives in the same directory as the “wp-admin, wp-content, wp-includes.”

wordpress root directory

Htaccess file naming convention

This file does not have any name actually. The “htaccess” is the file-extension (for example .jpg, .txt, .doc, etc).

The .htaccess file is written in Apache language (actually Apache Directive).

Htaccess stands for “Hypertext Access.” And the “.” (dot) makes it hidden in the Unix system/environment.

Default htaccess for wordpress

If you save your permalink twice, WordPress will create/recreate a ‘.htaccess’ file on the root. So if you need to regenerate your Htaccess for WordPress, log in to your website, navigate to “Settings » Permalinks.” You can but it’s not necessary to change the permalink structure. Just hit save twice.

But if it fails to recreate the file, or if the file is missing from your WP installation in some way, you can download the default htaccess for the WordPress website.

Download Default Htaccess for WordPress
# BEGIN WordPress

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Source: WordPress.ORG

If you have any questions, let me know.