.htaccess is the configuration file of Apache web server which defines who can/cannot access files of the website. Besides, it also defines the permalinks of the website using WordPress. You generally need not touch .htaccess file. But, in some case you are asked to add certain code in the .htaccess file. In such situation, you generally face trouble as you need to have either FTP connection to your web server or need to have cpanel access.

Do you know that you may already have the tool to edit .htaccess file of your WordPress website?

Yes, if you have installed Yoast SEO plugin, you already have a tool to edit .htaccess file. In this article, I’m going to show you how you can do  it easily from Yoast SEO plugin. Now, let’s begin.

Step 1:

Log in to the WordPress Dashboard.

Click on the SEO >> Tools menu.

Open tools menu of Yoast SEO

Step 2:

You’ll land on the Tools page of Yoast SEO.

Click on the File Editor as shown on the following screenshot.

Click on File Editor

Step 3:

File editor of Tools page opens. This page allows you to edit Robots.txt file and .htaccess file as shown in this screenshot.

Edit .htaccess file and save changes

After you edit the .htaccess file, click on the Save changes to .htaccess button.

Congratulations! You have successfully edited .htaccess file of your WordPress website from your WordPress dashboard.

Wrapping up

You shouldn’t edit .htaccess file unless you’re suggested from credible source or you know exactly what you are doing as it is very critical file. If you’ve any question or suggestion, kindly put that below as the comment.

We’ve lots more articles related to WordPress on the way. So, keep following WPCounsel.