htaccess file in WordPress
Wordpress

Where is the htaccess file in WordPress?

The htaccess file in WordPress is in the root directory of your website. I will show you two ways to find your htaccess file.

The first method is through your hosting Cpanel. On your Cpanel dashboard is a ‘File Manager’ icon. Once you select ‘File Manager’ you come to all the files for your website. On the list, find the ‘Public_HTML’ folder, once you open this folder, you will find your htaccess file.

The second method is through an FTP client. Once you gain access to your website files through the client, look for the ‘Public_HTMl’ folder, click on that to reveal the root directory of your website. You will find your htaccess file in this folder.

Let’s do that step by step.

Finding the htaccess file in your Cpanel

Sign in to your hosting Cpanel account. I use WebHostFace hosting, all hosting companies have Cpanels, the layout will differ for each company.

Here is my Cpanel dashboard.

Hosting Cpanel dashboard

In your Cpanel dashboard, look for ‘File Manager’. On my dashboard, it is the first icon on the top left. Once you find ‘File Manager’ on your dashboard, click on the icon.

Next, you need to find the root directory of your website, that is in the ‘Public_HTML’ folder.

Scroll down the list of folders and files until you find ‘Public_HTML’, you can search for this folder on the left or in the center. Double click to open this folder.

Your htaccess file is in your website root directory.

How to find the htaccess file in your Cpanel dashboard

How to edit the htaccess file in your Cpanel

To edit this file, right-click and select ‘Edit’

How to edit the htaccess file

The htaccess file is important for your website. I recommend to always make a copy of the file and save it to your computer before you do any editing. That way, should something go wrong, you replace the file with the original.

Locating the htaccess file in Filezilla FTP client

My favorite FTP client is Filezilla. To learn how to download and install Filezilla, check out my ‘Filezilla‘ post. I also have a video tutorial on how to download and install Filezilla on my YouTube channel.

Once you have connected to your site via Filezilla, your computer files are listed on the left, and your website files are listed on the right.

As with your hosting Cpanel, we are looking for the ‘Public_HTML’ folder. We can find this folder in the top or bottom window.

How to find your public_html folder in Filezilla

Once you locate the folder, double click on the folder icon to open it.

Now you are in the root directory of your website, it is here you will find your htaccess file.

Your htaccess file in your root directory

How to edit the htaccess file in Filezilla

To edit the htaccess file, right-click on your mouse and select ‘Edit’. Before you edit, I recommend you select ‘Download’ first. Doing this will save a copy of your original htaccess file to your computer.

editing the htaccess file in Filezilla

Should anything go wrong with your site after you edit the htaccess file, then all you need to do is upload the original copy back to your website.

Finding the htaccess file video tutorial

https://youtu.be/JiyXE194sjU

Conclusion

The htaccess file is important for your website if you want to edit this file, make a copy first. That way, if your website has a problem after you make your edits, you replace the edited file with the original file and the problem is resolved.

I have shown you two ways to edit your htaccess file. You can edit it through your hosting Cpanel in ‘File Manager’, or through an FTP client. I use Filezilla which is probably the most popular FTP client.

Comments

Which method do you prefer to use when editing your htaccess file?

If you have any questions regarding this post or other problems you have with WordPress. Leave me a comment below, I will do my best to help you.

Sharing is caring!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.