How To Show Hidden Files In cPanel (Like .htaccess)

Every WordPress installation has at least one "dotfile" called .htaccess.

Files usually have a file name, then an ending, like index.php. But .htaccess is just the ending.

By default, cPanel's File Manager doesn't show dotfiles. You have to change a setting so that you can see them.

To show hidden files in cPanel like .htaccess, click "Settings" in the top right corner of File Manager, then check "Show Hidden Files (dotfiles)" and click "Save".

Let's go through some screenshots to see it in action.

When you open File Manager for the first time on a WordPress installation, it will probably look something like this:

You might have more files and folders than this, or you might not have /cgi-bin/, /wp-snapshots/, error_log or the fantastico files. Those are just because of the particular server and WordPress setup that site uses.

The rest of the files and folders will be present on every WordPress installation.

Notice the absence of .htaccess?

Every WordPress installation has a .htaccess file to control how it serves the page structure and permalinks. The .htaccess file can also have code from security, caching or speed plugins.

If you delete the .htaccess file, your site will be instantly broken, which is why cPanel hides it by default.

However, we're responsible website developers and can handle the pressure.

We need to be able to access it if things aren't working properly, or we need to redirect pages, close down a website, or even manually backup WordPress.

In the top right corner of File Manager, click "Settings".

Make sure that "Show Hidden Files (dotfiles)" is checked.

Click "Save".

Now you should see the .htaccess file.

You might also see the .well-known folder. This is used for serving the SSL certificate on many systems. You don't need to touch it or worry about it unless something stops working.

Just know it's there for a reason and don't delete it.

Mike Haydon

Thanks for checking out my WordPress and coding tutorials. If you've found these tutorials useful, why not consider supporting my work?

Buy me a coffee

Leave a Comment