{"id":299,"date":"2018-10-04T15:42:48","date_gmt":"2018-10-04T10:12:48","guid":{"rendered":"https:\/\/awpguide.com\/?p=299"},"modified":"2018-10-04T15:42:48","modified_gmt":"2018-10-04T10:12:48","slug":"wordpress-directory-browsing","status":"publish","type":"post","link":"https:\/\/awpguide.com\/wp-guides\/wordpress-directory-browsing\/","title":{"rendered":"WordPress Directory Browsing – Here Is How To Disable It"},"content":{"rendered":"

When a folder got no index.php file or index.html file, the web server will start to show its contents. These days, you must prevent the unauthorized users from looking inside your directory. Last day, one of our users asked about WordPress directory browsing and the prevention. In this post, we will show you that, how can you disable directory browsing in WordPress.<\/p>\n

How To Prevent\u00a0WordPress Directory Browsing?<\/h2>\n

I hope most of you are using WordPress SEO by Yoast plugin. If you are, this will be pretty easy for you. If you are now, you need to use an FTP account or access the file manager.<\/p>\n

All we need to do for disabling directory browsing in WordPress, edit the .htaccess file and add a single line of code on it. So, let’s begin.<\/p>\n

Using Yoast SEO<\/h2>\n

First of all, you need to login to your WordPress dashboard and go to the tools section under the Yoast SEO section. There you can see the file editor.<\/p>\n

\"WordPress<\/p>\n

There, you can see the .htaccess file of your blog.<\/p>\n

\"wordpress<\/p>\n

You need to enter the below code into the .htaccess. After that simply save the file.<\/p>\n

 Options -Indexes <\/pre>\n

\"save<\/p>\n

WordPress directory browsing is simply disabled!<\/p>\n

Using cPanel<\/h2>\n

Log in to your cPanel and access file manager. Then you need to go to the public_html folder. There, you can see the .htaccess file.<\/p>\n

\"view<\/p>\n

If you haven’t seen it, you need to enable the show hidden files feature.<\/p>\n

<\/p>\n

Simply edit the file and add the code we mentioned above.<\/p>\n

\"edit<\/p>\n

That’s it!<\/p>\n

We hope you found this post helpful and enjoyed the read. If you did, please share this post with your friends and fellow bloggers. Also, for more tutorials, you need to check out our blog section<\/a>.<\/p>\n

You may also want to check our HappyThemes Revenue WordPress theme review<\/a> and how can you create a WordPress child theme<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

When a folder got no index.php file or index.html file, the web server will start to show its contents. These … <\/p>\n

Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":304,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/posts\/299"}],"collection":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/comments?post=299"}],"version-history":[{"count":0,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/posts\/299\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/media\/304"}],"wp:attachment":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/media?parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/categories?post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/tags?post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}