Hello friends, In this post I will talk about how to edit .htaccess file. Htaccess is the short code of Hypertext Access. This is a configuration file, which is used on the Apache-based Web server. Htaccess file that can control an entire directory in which it is living. Sub directory with all of them can even control, which is under the directory. Htaccess file is the potential that it may have password protected your directory, with its help you can ban or allow any statics IP address, You can prevent others from viewing inside the directory. You also can post the page redirect to another location.
So how you can edit .htaccess file in WordPress?
You can edit .htaccess file in wordpress two ways-
1- With the plugin. 2- With Cpanel.
1-Edit with Plugin-
Some good plugin are available for editing .htaccess files, eg – WP Htaccess Editor, Easy Digital Downloads-htaccess Editor & many users don’t know Yoast SEO Plugin. If Yoast SEO Plugin already installed on your WordPress website, you do not need to install any other plugin. With Yoast plugin you can easily edit root htaccess file.
How to edit .htaccess file with Yoast SEO Plugin-
Go to Network Admin Dashboard-
Now Click on Edit Files option in SEO.
Now enter your code in .htaccess file then Click on save changes to .htaccess button to making changes.
- Goto the Yoast SEO & click on Tools option.
- Now click on File Editor option.
- Edit file just like above.
- click on Save Changes to .htaccess button.
Edit with Cpanel Dashboard-
Login to your Cpanel Dashboard.
Find “File Manager” option & click on this.
File Manager Directory Selection box appear. Now Choose Document Root for option radio button & tick the Show Hidden Files (dotfiles) check box. After this click on Go Button.
Now, a new tab will open automatically. Right click on the .htaccess file and select Edit options.
Text Editor box appear simply click on Edit button to edit file.
Enter or paste your code in .htaccess file.
Then click the Save button.
To edit any other file, by following the same process.
For any type of problem and suggestions please type in the comment box.