Where is the htaccess file on WordPress_

The htaccess file on WordPress is in the root directory of your website. You can access this file through the Cpanel of your hosting account, or you can use an FTP client.

In my post, I show you how to find the htaccess file for your website through your Cpanel and by using the Filezilla FTP client, step by step.

Let’s begin.

How to find the htaccess file in your Cpanel

Your hosting company creates a Cpanel for your account so that you can access folders and files on your website. When you purchased your hosting package, your confirmation email contained the username and password for this account.

Here is my confirmation email when I purchased hosting from Bluehost.

Bluehost confirmation email

Log in to your hosting Cpanel account.

First, sign in to your hosting Cpanel account. This page is the login page for Bluehost.

Bluehost login page

On Bluehost, select ‘Advanced’ to get to your Cpanel.

Select 'Advance' to access your Cpanel

Other hosting companies direct you to your Cpanel dashboard when you log in.

Here is my Bluehost Cpanel. On your Cpanel, select ‘File Manager.’ If you don’t see ‘File Manager’, use the search feature at the top.

Bluehost Cpanel dashboard

Now you have access to all your website folders and files. The htaccess file is in the root directory of your website. To gain access to the root directory of your website, select ‘public_html.’

Here is your htaccess file.

htaccess file

If you don’t see the htaccess file, select ‘Settings.’ On Bluehost, ‘Settings’ is on the top-right.

Select settings

Ensure ‘Show hidden files’ is ticked. Then select ‘Save.’

Select show hidden files

Now you can see your htaccess file on your Cpanel.

How to edit the htaccess file in Cpanel

To edit the htaccess file, right-click and select ‘Edit’ from the popup menu.

how to edit the htaccess file

The htaccess file is essential for your website. Before you edit this file, I recommend you make a copy. Should your site break after you complete your edits, then you can replace the edited copy with your saved copy to reverse your changes.

How to find the htaccess file using FTP

I use Filezilla FTP. To learn how to download and install Filezilla, check out my ‘Filezilla‘ post.

Once connected via FTP, your computer files are on the left, and your website files are on the right.

To locate your htaccess file, you need to access your website’s root directory. Select the ‘public_html’ folder from the top or bottom window on the right.

Double click on the folder icon to open it.

Locate your public_html folder in Filezilla

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

Your htaccess file in your root directory

How to edit the htaccess file in FTP

To edit the htaccess file, right-click on your mouse and select ‘Edit’. Before you edit, I recommend you select ‘Download’ first, to save a copy to your computer. If after completing your edits you break your site, upload the copied file to reverse your changes.

editing the htaccess file in Filezilla

Now you can locate your htaccess file on WordPress via your Cpanel or using FTP.

How to find the htaccess file video tutorial

htaccess flle in WordPress - How to find and edit guide
Watch this video on YouTube.

Conclusion

Now you can find your htaccess file on WordPress. This file is essential for your website if you make changes to this file, you could break your site.

I always recommend making a copy of this file before you edit, then you can fix your site by uploading the saved file to reverse changes.

If you have any questions about this post or problems you are having on WordPress, drop me a comment below. I will do my best to help you out.

If you can spare one minute, I would love any feedback you have about my post. Let me know in the comments section below. I appreciate all feedback.

Similar Posts

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.