Why I Can’t Find .htaccess File?

There are two common reasons for not finding the .htaccess file in your website’s root folder. It’s either hidden by your file manager software, or it doesn’t exist at all.

We will explain both of them with solutions.

1. Your FTP Client is Not Showing Hidden Files

The dot before the htaccess file name indicates that it is a hidden file. By default, when you connect to your WordPress hosting server using an FTP client, it will not show the hidden files.

To make hidden files visible, you will need to change your FTP client settings.

For example, in FileZilla, you can find the option under ‘Server » Force showing hidden files’ menu.

If you are using the File Manager app in cPanel, then you will find the option to show hidden files before launching the app.

For other FTP clients, you will find the option to show hidden files in app settings or preferences menu.

After enabling this option, you would be able to view all hidden files including .htaccess file for your WordPress site.

2. The .htaccess File Doesn’t Exist

The second most common reason for missing .htaccess file is that your WordPress site has not generated it yet.

WordPress automatically generates .htaccess file because it is required to properly redirect permalinks.

If your .htaccess file is missing, then the first thing you need to do is to visit Settings » Permalinks page and click on ‘Save Changes’ button without changing anything.

WordPress will now try to generate the .htaccess file for you.

On some rare occasion, WordPress may not be able to generate the .htaccess file due to file permissions issue.

In that case, it will show you a message at the bottom of the Settings » Permalinks page, saying that the ‘.htaccess file is not writeable’.

You will need need to manually create the .htaccess file and add the required code inside it.

Simply copy and paste this code in a text editor like Notepad. After that, you need to save it as .htaccess file on your desktop.

Now connect to your website using an FTP client and upload the .htaccess file from your desktop.

If you get an error while uploading the file, then you need to change the file permission for your root directory.

Let’s suppose all your WordPress files reside under /home/johnsmith/public_html/ directory.

This makes public_html folder your root directory. You need to go to its parent directory and right click on the public_html folder. Select File Permissions, which will open a file permissions dialog box.

Now enter 755 into the file permission dialog box and then try to upload your .htaccess file to the public_html folder.

Was this article helpful?
0 out of 0 found this helpful