Find the .htaccess location of my WordPress site

Last updated on June 26th, 2022 at 11:41 am

Once your first professional WordPress site is created, it takes some time until you get to the point where you need to get to know where the .htaccess file is located.

If you want to access an .htaccess file from cPanel, the right way to do this is from cPanel > File Manager > Show Hidden Files (dotfiles) > Go.

Note that if you’re trying to access your .htaccess file from another location such as cPanel > Addon Domains > Installation path for the addon domain, this will not work. That’s because by default such cPanel directory shortcuts don’t display the files that are hidden or protected.

In this article, we will have a look at how to find the .htaccess file of a WordPress site that is hosted on a cPanel hosting account. Let’s use my GoDaddy managed WordPress account on cPanel for this.

Find the .htaccess file of your WordPress site from File Manager in cPanel

1. Access your GoDaddy cPanel, click on File Manager.

2. You need to select Show Hidden Files (dotfiles) as the .htaccess file is hidden for security reasons.

3. Select Web Root (public_html/www) or the Document Root for the installation folder of the site that you’d like to find the .htaccess file for.

4. Click on the Go button.

Congrats! Your .htaccess file should be there. If there’s no .htaccess for some reason, feel free to create a new .htaccess file manually for your WordPress site.

Find the .htaccess file of your WordPress site via FTP using FileZilla

1. Open FileZilla, enter your FTP login details in order to connect to your hosting account via FTP.
2. Browse to the installation folder of the WordPress site that you’re interested in.

3. Once you’re in the default installation folder of your site, scroll down if needed until you find the .htaccess file.

Don’t worry if you can’t find any .htaccess file in the installation folder of the site. This means that your site doesn’t have such a file currently. In this case, you will need to create a new .htaccess file for your site.

Author: wpbackend

Content creator at wpbackend.com

Leave a Reply

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