Skip to content Skip to main navigation Skip to footer

Default WordPress .htaccess file

Below is the code needed to create a basic .htaccess file. This file allows the sub-pages on a WordPress site to load and is recommended for most WordPress sites.

# 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	

This is a basic & default WordPress .htaccess file. This file can be customized further if needed. This template is a good starting point for any WordPress site.

Related Articles