WordPress How to

How to Add .htaccess File in WordPress (Complete Guide)

WordPress is the best platform for beginners and also for small and large Business. Many People want to make a website but there are some issues when making a new Wordpress blog/Website. Sometimes we don’t know what we did but after finding we realized this is too much 🙂

How to Add .htaccess File in WordPress (Complete Guide)

How to Add .htaccess File in WordPress (Complete Guide)

So today we are discussing the WordPress big issue. When we made a WordPress website and we facing the website not accessible so we will try to find the issue otherwise we open a ticket to hosting provider or chat with support to solve the issue. We also faced these types issues and after solving we think the support is very great and genius but we can easily resolve these types issues itself.

Advertisements

 

What Is the .htaccess File in WordPress

The .htaccess is one of the file which is very important like a heart for a human when we have a Website and we installed all things but we missed this file so we can’t access the website and facing 500 internal server error. Because .htaccess file gives the instruction, how to access the website post and pages. Sometimes the .htaccess file missing then every page showing 500 internal server error.

The .htaccess file also useful for redirection if you want to redirect your old URL to new URL so you can easily redirect and many plugins like WP 3 total Cache or WP Super Cache defined the rules in the .htaccess file. We also discuss the .htaccess file benefits and now we are going to share how to add the .htaccess file.

How to Add .htaccess File in WordPress

First of all, open the website root directory and create a new file

How to Add .htaccess File in WordPress (Complete Guide)

Now enter the name “.htaccess” 

How to Add .htaccess File in WordPress (Complete Guide)

Now click on  View/edit the .htaccess file

How to Add .htaccess File in WordPress (Complete Guide)

Now Copy the Below code and paste into .htaccess file. Once you paste the code then save the 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

 

So today we solve 50 internal server error via .htaccess. If you have any issue related WordPress you can contact us via comment area!

Leave a Comment