WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Beginners Guide» Why You Can’t Find .htaccess File on Your WordPress Site

Why You Can’t Find .htaccess File on Your WordPress Site

Last updated on April 2nd, 2019 by Editorial Staff
451 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
Why You Can’t Find .htaccess File on Your WordPress Site

Are you having trouble finding the .htaccess file in WordPress? We are often asked by beginners ‘Where is my .htaccess file?’ and ‘Why I cannot find it on my WordPress site?’.

Sometimes you may need to edit the .htaccess file or delete it to fix a common WordPress errors. In this article, we will explain why you can’t find .htaccess file on your WordPress site, and how to easily locate it.

Finding the .htaccess file for your WordPress site

What is .htaccess file?

The .htaccess file is a server configuration file which tells your server how to handle certain things on your website. Like how to redirect users, password protect admin area, or protect some directories, etc.

It is located in your WordPress site’s root folder. WordPress uses it to manage redirects and permalinks.

The .htaccess file is an incredibly powerful configuration file and can be used to do a lot useful things. See our article on the most useful .htaccess tricks for WordPress for some examples.

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.

Show hidden files in FileZilla

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

Show hidden files in cPanel

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.

Permalinks settings page

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.

htaccess file not writeable

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.

Changing file permissions via FTP

We hope this article helped you find .htaccess file on your WordPress site. You may also want to see our WordPress troubleshooting guide to learn how to diagnose and fix WordPress issues all by yourself.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

451 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

75 Comments

Leave a Reply
  1. Raafat says:
    Sep 26, 2020 at 7:03 pm

    Thank you. You saved my life. :)

    Reply
    • WPBeginner Support says:
      Sep 28, 2020 at 10:34 am

      You’re welcome, glad our guide was helpful :)

      Reply
  2. Syed Mehmood says:
    Sep 17, 2020 at 3:32 pm

    In my Cpanel there are so many .htaccess files so can i delete them or not?

    Reply
    • WPBeginner Support says:
      Sep 21, 2020 at 10:32 am

      If you have multiple with the same name for some reason, you may want to check with your hosting provider’s support in case it was set up for something specific to your hosting provider.

      Reply
  3. Jessica says:
    Aug 13, 2020 at 7:57 pm

    This worked perfectly, thank you!

    Reply
    • WPBeginner Support says:
      Aug 14, 2020 at 10:09 am

      You’re welcome :)

      Reply
  4. Amber says:
    Aug 10, 2020 at 8:42 pm

    I still can’t find the .htaccess file. I’m using a free WP site (so plugins aren’t available), and there’s no “permalinks” section in the admin for me to manually create the file. What should I do?
    Thanks!

    Reply
    • WPBeginner Support says:
      Aug 11, 2020 at 10:47 am

      WordPress.com does not give access to your htaccess file. If you wanted that you would need to use WordPress.org and we have our comparison guide on the two below:

      https://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/

      Reply
  5. Thomas Jones says:
    Aug 3, 2020 at 10:05 am

    After a php version update my site went down. The hosting company are no help at all. I read your blog and updated my permalinks file and all works fine now. Many thanks, Tom : )

    Reply
    • WPBeginner Support says:
      Aug 4, 2020 at 10:47 am

      Glad our recommendation was able to help :)

      Reply
  6. Thor Erik Just Olsen says:
    Jul 1, 2020 at 11:59 am

    Thank you! Saved my day :D

    Reply
    • WPBeginner Support says:
      Jul 2, 2020 at 8:51 am

      Glad our guide could help :)

      Reply
  7. Urdesigno says:
    Jun 11, 2020 at 8:45 am

    Thank you this artical is very help full

    Reply
    • WPBeginner Support says:
      Jun 11, 2020 at 8:53 am

      You’re welcome, glad our guide was helpful :)

      Reply
  8. Rafael says:
    Apr 28, 2020 at 9:41 am

    Great! It was just hidden, in WinSCP

    Reply
    • WPBeginner Support says:
      Apr 28, 2020 at 1:38 pm

      Glad our recommendation could help :)

      Reply
  9. pankaj says:
    Apr 27, 2020 at 7:50 am

    Quite a Helpful article, thankyou. one question though do we really need .htaccess file as being an administrator?

    Reply
    • WPBeginner Support says:
      Apr 28, 2020 at 1:24 pm

      Yes, your site should have an .htaccess file. It handles some things on your site and gives you more tools you can use.

      Reply
  10. Tammy says:
    Apr 23, 2020 at 9:47 pm

    This was so helpful, thank you!

    Reply
    • WPBeginner Support says:
      Apr 24, 2020 at 10:28 am

      You’re welcome, glad our guide was helpful :)

      Reply
  11. Dev says:
    Apr 15, 2020 at 11:01 am

    Thanks so much! This solve my issues, i was about to get crazy, thanks!

    Reply
    • WPBeginner Support says:
      Apr 16, 2020 at 8:54 am

      You’re welcome, glad our guide could help :)

      Reply
  12. Michael says:
    Feb 17, 2020 at 2:14 am

    Saved my day! Thanks

    Reply
    • WPBeginner Support says:
      Feb 17, 2020 at 11:44 am

      You’re welcome, glad our article could help :)

      Reply
  13. Arnold Alphonce says:
    Sep 26, 2019 at 5:49 am

    Thanks that was really helpful. I did not save changes for the first time and also the permission as you said. Once i did that i worked fine thanks again

    Reply
    • WPBeginner Support says:
      Sep 26, 2019 at 11:32 am

      You’re welcome, glad we could be helpful :)

      Reply
  14. Arif Billah says:
    May 31, 2019 at 7:13 pm

    Thanks for the help, this blog helps me a lot, i had been working to resolve this for 3 days.

    in my case file name was not written, i have identified it with file type.

    100% beginner also not an IT guy. :)

    once again Thanks a lot

    Reply
    • WPBeginner Support says:
      Jun 3, 2019 at 11:22 am

      Glad our article could help yo fix the issue :)

      Reply
  15. Luke Cavanagh says:
    May 17, 2019 at 11:51 pm

    Also you may not be able to the find .htaccess file on the site server, since NGNIX is being used.

    Reply
    • WPBeginner Support says:
      May 20, 2019 at 11:58 am

      You are correct, that is another possibility but not always a common one :)

      Reply
  16. gurdeep says:
    Apr 20, 2019 at 4:55 pm

    hi. I tried to see if the file was hidden. This didn’t start showing .htaccess. I then went to permalinks and saved changes (even tried updating some settings and updating again) a few times. I didn’t get any text from WP. It just accepted the changes. I still can’t see the htaccess file.
    Not sure why this is happening. Can you please help.

    Reply
    • WPBeginner Support says:
      Apr 22, 2019 at 1:46 pm

      You may want to check your hosting provider to see if they see the htaccess on their end.

      Reply
  17. sany says:
    Feb 6, 2019 at 5:42 pm

    hey there,
    I followed the instructions step by step, however I still cannot find the .htaccess -.-
    when I create one on my mac with text pad (or should I use word doc?) and try to paste it via ftp (filezilla) in the ” / ” folder but it still does’nt work.

    The links on my wordpress shows “404 Not Found nginx”

    please help!!

    Reply
    • WPBeginner Support says:
      Feb 7, 2019 at 11:06 am

      You may want to ensure you don’t have a file extension on the end of your .htaccess file as that is one of the more common reasons it does not work.

      Reply
    • mohit verma says:
      Mar 5, 2019 at 6:37 am

      Go in WordPress and then click on settings and then select permalinks and then select plain and then save changes

      Reply
  18. abhishek says:
    Nov 11, 2018 at 3:30 am

    hey . i need your help regarding my cpanel . it shows only text and when i click on any tool it gets logged out. i have tried many ways to repair my cpanel but can’t resolved it . i m using cloudflare though.

    Reply
    • WPBeginner Support says:
      Nov 11, 2018 at 2:18 pm

      Hi Abhishek,

      Please contact your hosting provider. They will be able to fix this issue for you.

      Reply
  19. Don Herman says:
    Oct 11, 2018 at 1:17 pm

    This probably worked once, but no longer. No message appears on the Permalinks page when you save it. Show Hidden Files in FileZilla doesn’t reveal the .htaccess file. Pretty much useless from the get-go.

    Reply
    • WPBeginner Support says:
      Oct 12, 2018 at 1:25 pm

      Hi Don,

      It still works. .htaccess file is hidden by default. If you cannot see it in your FTP client, then please try a different FTP program.

      Reply
  20. Ted Fisher says:
    Mar 26, 2018 at 10:36 pm

    Very weird! Please help. I did find my .htaccess file and copied and pasted the code into it. Now all pages are secure except the home page. Any help would be appreciated.

    thanks,
    Ted

    Reply
  21. gretchen says:
    Jul 31, 2017 at 1:49 am

    :( I followed all the steps but I still don’t see an .htaccess file in my FTP. I didn’t see any message at the bottom of the page after I clicked “save changes” on my permalink page.

    Reply
    • Petra says:
      Aug 21, 2017 at 1:35 pm

      I have the same problem.

      Reply
      • Carolina says:
        May 31, 2018 at 6:27 pm

        I have the same problem. No .htaccess using CuteFTP (yes, I enabled filters) and the file manager in Plesk. Does this mean there isn’t one??? Please answer!!!

        Reply
        • WPBeginner Support says:
          Jun 4, 2018 at 12:11 am

          Hi Carolina,

          If your web hosting server is using a different software like Windows or Nginx then you may not be able ot find .htaccess file.

  22. Anj says:
    Jul 28, 2017 at 9:21 pm

    It helps a lot .. Thanks .. i can access again my website .

    Reply
  23. Neil says:
    Jul 4, 2017 at 2:04 pm

    The htaccess rewrite worked! Thanks ever so much for your help. Brain is fried after a complete loss of dashboard today. I had to create a .htaccess file and upload it through ftp.

    Thanks again

    :)

    Reply
  24. Kathy says:
    May 3, 2017 at 1:00 pm

    OMG thank you. I added this to my .htaccess file

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300

    FTP wouldn’t let me overwrite .htaccess so I uploaded it as .htaccess-new then deleted .htaccess and renamed .htaccess-new to .htaccess

    Yay!

    Reply
  25. Annie says:
    Apr 24, 2017 at 3:42 pm

    Hello,

    I am unable to select any of the code in the box to recreate my .htaccess file. It appears to be an image file only…

    Thanks.

    Reply
  26. Emilio says:
    Apr 20, 2017 at 10:16 am

    Thank you! You saved my day, I started to get worried I will not fix this. I appreciate it, honestly.

    Reply
  27. Tony says:
    Dec 5, 2016 at 10:21 pm

    Can you please tell me how to keep WP back end log in longer time when i am on back end for uploading? because due to SSL, it automatically logs out of the account in some minutes and ask me to log in again. this is troublesome, thank you

    Reply
    • Nadir says:
      Mar 26, 2017 at 2:47 pm

      I have the same problem! did you find a solution?
      please help.
      thanks

      Reply
  28. Kay Collier says:
    Nov 7, 2016 at 1:21 am

    The permalinks solution didn’t work for me either.

    In cPanel I have a page that will allow me to edit 403 (forbidden) but when I click on the code to edit I’m absolutely lost which is very annoying as I’m sure it must be easy to do, if only I knew how!

    Can anyone explain please?

    Sincerely

    Kay

    Reply
  29. Axel says:
    Nov 1, 2016 at 6:14 pm

    Hi!

    I am new to wordpress and have set up my wordpress site this weekend. To ensure it is safe, I followed the htaccess/htpasswd settings today and all worked fine.

    After some hours, I could not access my wordpress site anymore but get the error message

    [Tue Nov 01 20:31:36 2016] [authn_file:error] [pid 26428] [client xxx.xxx.xx.xxx] [host xxx.xxx.de] AH01620: Could not open password file: /XXX.htpasswd

    How can I overcome this issue?

    thanks for any help!
    Axel

    Reply
    • WPBeginner Support says:
      Nov 2, 2016 at 12:10 am

      Please contact your hosting provider. They will be able to assist you better. Meanwhile, you can try steps mentioned in our WordPress troubleshooting guide.

      Reply
  30. juan luis says:
    Jun 4, 2016 at 9:13 am

    You have a wonderful page. My only objection is that font sizes are too samall. I print everything I read

    Reply
    • dt.k says:
      Nov 24, 2016 at 10:13 am

      Why don’t you just zoom your browser window in to make the text larger?

      Reply
  31. Jazib says:
    May 18, 2016 at 12:46 pm

    i don’t want to use ftp client method. Tell me how to edit htaccess file via cpanel

    Reply
  32. lmahdi says:
    May 18, 2016 at 8:26 am

    thanks

    it’s salve me

    Reply
  33. Fahad Saleem says:
    Apr 10, 2016 at 1:18 am

    Thanks it really helped.
    Keep sharing more wisdom.!

    Reply
  34. Habib says:
    Nov 17, 2015 at 11:31 pm

    Really interesting and informative post. I like all posts of wpbeginner.com. nice website.

    Reply
  35. Caspar says:
    Aug 21, 2015 at 4:19 pm

    Hey.. I played around with WP rocket and cleared my .htaccess – Now i am missing elements and sections of my webpage. I have tired to disable minifying. But still nothing happens.

    Really i have no idea of what made these sections disappear . Any one have an idea of what i should try?

    Reply
  36. Olatuga Moses says:
    May 19, 2015 at 6:27 pm

    Is there any way or some how I can make my audio wp content downloading be available to all mobile device,like if I just upload audio to W-P it is only some specific device that would be able to download it with streaming online.like I need help on how to make my audio link download on all mobile device.

    Reply
  37. Suzy says:
    Apr 22, 2015 at 8:39 am

    Having tried the above I still can’t see my htacess file and I do not get the message saying not rewritable under permalinks. Can anybody help, I’ve been getting the 500 Internal Server Error for two days now and am desperate to update to the latest version of WordPress. My site is slow and shows the message frequently. Any help would be gratefully appreciated.

    Reply
  38. aditya says:
    Mar 25, 2015 at 9:05 am

    WP Maximum Execution Time Exceeded.
    give it a try.
    its working now i get relief.
    thanks for your help.
    i really appreciate your work.
    thanks thanks thanks!!!

    Reply
  39. Tan says:
    Jul 10, 2014 at 4:19 am

    Thank you! You wake me up from the death!

    Reply
  40. jackel says:
    Jun 15, 2014 at 8:32 am

    Solved: Yesterday I started my second wp site, all went well until I noticed that all permalink options didn`t work except the default one, every time I changed to another permalink structure, I received the famous 404 error. I cross referanced with my first wp site, and noticed that the web.config file was not in the root. Obviously I copied and pasted the web.config file from my first site to my new site, refreshed and now all permalinks work fine.

    Reply
  41. Talib says:
    Jun 12, 2014 at 9:50 pm

    dear can we use .htaccess Plugin by aubrey poortwood, is it bettter or not

    Reply
  42. Miello says:
    May 18, 2014 at 9:38 am

    thanks for this! Just ran into this and this helped me solve my issue.

    Reply
  43. McGhori says:
    Mar 18, 2014 at 3:25 am

    Thanks you so much Balkhi, Your information is brilliant Boss. Thanks again.

    Reply
  44. Dave Naylor says:
    Mar 17, 2014 at 5:07 am

    It’s worth pointing out that your .htaccess file might be missing because you don’t need one. For instance the Nginx web server doesn’t use .htaccess files for security and performance reasons.

    Reply
  45. Pierre Gazzola says:
    Mar 14, 2014 at 2:35 pm

    Hope you do not intended to leave permission at 755 for the file or anyone would be able to hack your site via that file no ?

    Reply
    • WPBeginner Support says:
      Mar 16, 2014 at 1:42 pm

      755 is safe, 777 will make your files writable by anyone.

      Reply
  46. Howard Lee Harkness says:
    Mar 13, 2014 at 2:09 pm

    I had occasion to look around for some redirection plugins for WP, and I noticed that some implement “hit counters.” I suspect all of them have to put something in the .htaccess file. I would love to see an article that goes into more depth on redirection, link cloaking, and hit counters.

    Reply
  47. Kasa says:
    Mar 13, 2014 at 10:03 am

    Isnt it easier co create .htacces right in cPanel (if you dont have it) rather than saving in notepad and uploading via ftp?
    I think that way is more easier and faster.

    Reply
    • WPBeginner Support says:
      Mar 14, 2014 at 11:42 am

      Kasa yes this should work too, however many users don’t have access to cPanel. Some webhosts use their own hosting control panels.

      Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
RafflePress - WordPress Giveaway and Contest Plugin
RafflePress
Giveaway and Contest Plugin for WordPress. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
MainWP
MainWP Coupon
Get 15% OFF on MainWP WordPress multisite manager plugin.
Web Hosting Hub
Web Hosting Hub Coupon
Get 44% off Web Hosting Hub hosting plans.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.