background img
Jun 13, 2020
162 Views
0 0

How to edit WordPress .htaccess file

Written by

Do you want to edit the .htaccess file in your WP site? WordPress .htaccess file is a very important file found in the root folder of your site.

Today in this article I will tell you how to edit .htaccess file in WordPress.

There are several methods that you can use to edit the WordPress .htaccess file, here I will tell you about three methods.

  • With the help of Yoast SEO plugin
  • with the help of cPanel
  • Using the WP File Manager plugin

But before that, you will know what is WordPress .htaccess file.

What is a WordPress .htaccess file

When we install a WP site, the .htaccess file is automatically created in the root folder of the WP installation. You can see this by going to cPanel >> File Manager >> Public_html.

What are the benefits of the WordPress .htaccess file

  • Fix the error pages on your site.
  • You can block visitors based on IP.
  • You can change your default directory page.
  • Visitors can be redirected to any other page, and more.

So, let’s get started on how to edit .htaccess file in WordPress…

How to edit WordPress .htaccess file

Here we will tell you 3 ways by which you can easily edit your .htaccess file. But before you start editing, make sure to backup your .htaccess file.

1. With the help of Yoast SEO plugin

If you use the Yoast SEO plugin on your website, you can easily edit the .htaccess file. Just click SEO >> Tool >> File editor.

This tool allows you to quickly change your robots.txt and .htaccess file. The first box is for Robots.txt edit and the second box is for .htaccess file. To edit the .htaccess, scroll to another box.

2. With the help of cPanel

Just go to your web hosting and login to your cPanel and then click on File Manager >> Public_html. Here you will see the .htaccess file. Select the .htaccess file and you can click on the edit button.

wordpress htaccess

An editor tab will appear in front of you. You can make changes in your WordPress .htaccess file.

3. Using the WP File Manager plugin

Go to the WordPress plugin page and install and activate WP File Manager on your site. After activating the plugin, click on WP File Manager.

Here you will not need to do anything. Just select your .htaccess file and click on Edit file to make changes.

wordpress htaccess

enough! I hope this post helped you edit your .htaccess file.

Small request, if this article has proved helpful for you, then don’t forget to share it!

Also Read:-

Article Tags:
Article Categories:
WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *


The maximum upload file size: 300 MB.
You can upload: image, audio, video, document, text, other.
Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded.