How To Find Your WordPress .htaccess File

The .htaccess file is a great tool that you can use to do some amazing things. However, what do you do if you do not know where to find it or if you do not have one? We are going to cover all of the basics here. Here are some of our tips on how to find or recreate your .htaccess file.

What is the .htaccess file?

This is the hypertext access file. It allows you to configure several things supported by the web server. By adding or removing details from the .htaccess file, you can change how the server handles things.

It is most often located in your root directory. This means it should be sitting within your “public_html” folder. However there are certain situations where it might be missing or perhaps you just cannot see it.

Where did the .htaccess file go?

Double check your FTP client settings. It could be that you have the FTP client set to hide certain files or you may need to set it to show hidden files on the server.

There could have been a plugin that somehow removed the .htaccess file too. Double check your plugins (especially the ones who write details to the .htaccess file) to make sure this is not happening.

If your most recent WordPress update didn’t fully complete, this could also be the reason why your .htaccess file has gone missing.

Easy Way to Create Your .htaccess File

The quickest way to set up your .htaccess file from within WordPress is to set up your permalinks in WordPress. You can do this from the WordPress Dashboard by going to Settings > Permalinks. I


f you click on the “Save Changes” button, you will create a new .htaccess file.

Another way to do this would be to use a program like Notepad. Simply open up the program and input your details you need in your .htaccess file. Next, save the file as “.htaccess” and then upload it to your website’s root directory.

Hopefully this helps you troubleshoot the WordPress .htaccess file

There are a lot of neat things you can do for your website via the .htaccess file. If you have lost your .htaccess file or needed to recreate it, I hope this little explanation of how or why that could happen helps. If you run into any other errors you’d like to see us cover make sure you let us know.

5 thoughts on “How To Find Your WordPress .htaccess File”

  1. Why am i getting a google warning deceptive page
    wp-login.php?redirect_to wp-admin/plugins.php&reauth=1

    I will be extremely grateful for your help.

  2. Without any reason I don’t know why my account show forbidden 403 from this i can not see my mails and my web page is not display i always worried about my important mails that i could not see the mails.pls give me the solution that forbidden 403 is not seen again.


  3. I didn’t really understand this at all. “The quickest way to set up your .htaccess file from within WordPress is to set up your permalinks in WordPress.”
    Okay, I already have that set up. But I have no idea where to see the .htaccess files

    It’s probably intuitive to the author, as she’s likely a coding expert. To the person who knows very little, this is not intuitive and I wish it were presented with more transparency.

    1. Hi Gretchen,

      WordPress automatically creates the .htaccess file in your hosting directory when you enable Permalinks. Generally, the .htaccess file is found within the root or home directory of your hosting account. For example, at GreenGeeks, your .htaccess file for WordPress would be found within your WP installation directory. For example: /home/yourusername/public_html/.htaccess

      I hope this helps.

Leave a Comment

Your email address will not be published.

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

Copy link