Earlier, I posted about the WordPress .htaccess file.
Here I’m sharing a quick tutorial on how to edit your WordPress .htaccess file.
There are many methods which you can follow, and here we will look into three of them:
- From the cPanel.
- From the WordPress dashboard.
- Using a desktop FTP client.
Moreover, when you edit your WordPress permalinks, you need to update your .htaccess file. If you are a self-hosted WordPress user, you should know about the .htaccess file and how to edit it.
How to edit WordPress .htaccess file using cPanel:
Most web hosting companies offer cPanel, which makes it easier for non-technical people to play around with and edit their .htaccess file.
The cPanel is especially useful for non-technical people who need to add or edit some codes. They can quickly do it using this online editor.
First, log in to your cPanel. Click on “File Manager” under the “Files” section.
Depending on your WordPress installation directory, you will find .htaccess at the root of your WP installation. If you don’t see it, refer to my create WordPress .htaccess notes to add one.
Select the .htaccess file and click on “Edit”. This will open the editor in a new tab and you can make changes right from there.
Make changes and save the file.
Editing .htaccess from the WordPress dashboard:
There are many WordPress plugins which offer the feature to edit your .htaccess file from the WP dashboard. If you are using the SEO by Yoast plugin, you can access it from SEO by Yoast > Edit Files.