General Topics

Access htaccess File WordPress Strategies For Beginners

WordPress is a self-hosted software which gives freedom to use it with a powerful grip on your website. Now I am going to tell you about the way to access htaccess file WordPress. You know htaccess file is the most important file of the WordPress. Because in which you can create rules regarding site’s security. You can block bots, create 301 redirects and secure your site from spammers etc.

Either, many WordPress site’s owners don’t have an idea about it in depth. I will tell you some codes also for securing your website from hackers. Now let’s start to proceed this:

Knowledge About htaccess file WordPress?

This is a file which is not only linked with WordPress. Most hosting providers offer htaccess file feature. While installation of WordPress htaccess file also available but often not showing. So after check the option to show dot files the hidden files come in front of your eyes.

But after check the option to show hidden files. If you have failed to see then just create a new file with the name of .htaccess.

File Manager CPanel

After it, just save settings by accessing WordPress dashboard. Settings » Permalinks. If a new file has created in the root directory then better otherwise just create a new file and paste the below code.

# BEGIN WordPress
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

There are two methods to access htaccess file. The first one is CPanel and second is edit it via WordPress plugin. Now here a question arise which WordPress plugin? Yes! that the Yoast SEO. Due to this plugin, you are going to higher rank your site and access robots.txt and htaccess file easily.

After installation of this plugin, you don’t need to login CPanel. However, I am sharing here both methods to access this file.

Let’s see if you want to access this file via CPanel then how to?

Access htaccess File Using CPanel In 2 Minutes

Let’s see how to access htaccess file using CPanel in just 2 minutes.

  • First Login to the CPanel.
  • After logging in find File Manager and click on it. Now check Show hidden files.

File Manager CPanel

  • Now open the public_html folder by click on anyone side.

Public HTML folder

  • You have to access the htaccess file.

.htaccess file location CPanel

  • Edit your file like shown as under screenshot.

Edit File in CPanel

Access htaccess File Using WordPress Plugin Yoast SEO

Above I have told how to access htaccess file using CPanel. Now the turn how to access this file using WordPress plugin Yoast SEO.

  • First login WordPress admin area. In left pane search Yoast SEO tab and click on it. It will expand now click on Tools.

Yoast SEO Tools

  • The new interface will open like shown as under pic. Now click on File editor. Just scroll down you will get here.

Yoast SEO File Editor


That’s the method to access the htaccess file. If you have this file and want to modify this then take backup of this file. Because due to wrong insertion of code you will down your website. In the case of any difficulty, you can leave a comment in the comment section. If you like this then don’t forget to follow us on Twitter. Lastly, I have some suggestions for you which will help you to rank higher on Google. Just click on the below link and enjoy these ones.

Supporting Articles

How To Create?

SEO Strategy 2017: Experienced Way Which Create 502% Organic Visits

Would You Like To Know About Dofollow Backlink With Bonus Tip

Show More

Muhammad Awais Azeem

"Global Blurb since 2015" M. Awais Azeem is the CEO and founder of Global Blurb. The blog designed to share ideas about different topics. My profession is Accountant and I have completed CA Inter from Institute of Chartered Accountants of Pakistan. Me and my time present to sort out any issue regarding SEO, Blogging, Content Marketing and WordPress. Hire Us and Goodbye difficulty.

Related Articles

Want to contribute