Here is the tips for edit your WordPress .htaccess file. There are many different methods to edit .htaccess file some of the following steps which i have written here you can just click on this and get the editing method.
- From the WordPress dashboard.
- Using a desktop FTP client.
- From the cPanel.
If your site is not redirected to ssl link then you need to edit your WordPress .htaccess file.
How to edit WordPress .htaccess file From the WordPress Dashboard:
- Log in to your WordPress website. When you’re logged in, you will be in your ‘Dashboard’. On the left-hand side, you will see a menu. In that menu, click on ‘SEO’.
- The ‘SEO’ settings will expand providing you additional options. If you don’t see the ‘Tools’ setting in your ‘SEO’ menu, please enable your Advanced Settings first.
- Click on ‘Tools’.
- Click on ‘File Editor’.
- Make the changes to your
- Save your changes.
How to edit WordPress .htaccess file Using a desktop FTP client:
FTP method is on of the easy method to edit .htaccess file and i am also using this method for editing .htaccess file. why people are using ftp method because FTP Clients giving more controls to edit the .htaccess file.
simple for FTP method you can use FileZilla FTP client to edit .htaccess file. with the help of FTP client you can directaly access your root or hosting file manager of website. before doing this you need to enable hidden items to edit .htaccess file.
Follow this step to enalbe hidden item to show Here is how you can enable it: FileZilla Menu Options > Select Server > Force showing hidden files
Now navigate to the root folder of your domain. Your .htaccess file will be at the root of the folder.
Download your .htaccess file and start editing.
Before editing make sure you have taken a backup of your .htaccess file. You can use your OS default text editor (Notepad) to edit the file, and once it’s edited, simply re-upload it back.
- Make sure that the permission of your .htaccess file is 644 and not 777.
How to edit WordPress .htaccess file Using CPanel:
Before we do anything, it is suggested that you backup your .htaccess file so that you can revert back to a previous version if something goes wrong.
To Open the File Manager
- Log into cPanel.
- In the Files section, click on the File Manager icon.
- Check the box for Document Root for and select the domain name you wish to access from the drop-down menu.
- Make sure Show Hidden Files (dotfiles)” is checked.
- Click Go. The File Manager will open in a new tab or window.
- Look for the .htaccess file in the list of files. You may need to scroll to find it.
To Edit the .htaccess File
- Right click on the .htaccess file and click Code Edit from the menu. Alternatively, you can click on the icon for the .htaccess file and then click on the Code Editoricon at the top of the page.
- A dialogue box may appear asking you about encoding. Just click Edit to continue. The editor will open in a new window.
- Edit the file as needed.
- Click Save Changes in the upper right hand corner when done. The changes will be saved.
- Test your website to make sure your changes were successfully saved. If not, correct the error or revert back to the previous version until your site works again.
- Once complete, you can click Close to close the File Manager window.
let us know if you still have questions regarding the steps to edit your WordPress .htaccess files
Subscribe to our email newsletter to receive more WordPress, SEO, Youtube, ect tutorials.