Earlier, I posted about WordPress .htaccess file and here I’m sharing a quick tutorial on how to edit WordPress. htaccess file. There are many methods which you can follow to do the same, here we will look into three of them: cPanel method, WordPress dashboard and using any FTP client from desktop.
More over when you edit your WordPress permalink, you need to update your .htaccess file. If you are a self hosted WordPress user, you should know about .htaccess file and how to edit it. In this tutorial, I will be sharing how you can edit WordPress .htaccess file using a free FTP client like FileZilla.
How to edit WordPress .htaccess file using cPanel:
Most of the Web hosting companies offers cPanel, which makes it easier for non-technical people to play and edit .htaccess file. In this part, we will learn using cPanel method to edit. htacess file. This is specially, useful for non-technical people who needs to add or edit some codes and they can quickly do it using online editor.
Login to your cPanel, and click on File manager under Files section.
Depending upon your WordPress installation directory, you will find .htaccess at the root of your WP installation. If you don’t see it yet, refer to my Create WordPress .Htaccess notes to add one. Select .Htaccess file and click on Edit file, it will open editor in new tab and you can make changes right from there.
Make changes and save the file and verify the same.
Editing .Htaccess from WordPress dashboard:
There are many WordPress plugins which offers feature to edit Htaccess file from Wp dashboard. One of them is Meta robots plugin, which not only let you edit default one but also one which is added by Super cache in cache dir. This, is again useful but for newbie, I suggest use it without own risk. Because, even a single wrong code can bring your site down and you need to use cPanel or FTP to fix the error.
Anyways, for tutorial sake, Install Meta robots plugin and activate it. Go to Settings > Robots meta and scroll down to see a screen like this where you can make changes in .htaccess file:
Editing file using FTP client:
This is my favorite tool as I love to do things on desktop and FTP client gives more control. Simply, use any free FTP client like FileZilla and login to your hosting FTP account and browse to root of your installation. You have to enable show hidden items to see Htaccess file, else it’s in hidden mode. Here is how you can enable it:
Under FileZilla Menu options> select server> Force showing hidden files
Now navigate to your root folder of your domain in my case it is shoutmeloud.com and download your .htaccess file. Your .htaccess file will be at the root of the folder.
Make sure you take a back up of your .htaccess file before you starts editing it. You can use your OS default text editor to edit the file and once you have edited the file, simply re-upload it back. Make sure that permission of your .htaccess file is 644 and not 777.
In upcoming posts, I will be sharing couple of WordPress .htaccess hacks which will make your life easier. You might consider reading:
- Step by step guide to install self hosted wordpress blog
- 8 reasons why self hosted wordpress blog is better than free blogs
Do let us know if you still have questions regarding steps to edit WordPress .htaccess file, then do let me know. Do subscribe to our Email newsletter to receive more WordPress tutorials.
Subscribe to Download WordPress Guide Worth $99