Home « General Topics « How To Create htaccess File WordPress?
How To Create htaccess File Wordpress

How To Create htaccess File WordPress?

If you want to see sample .htaccess file. Then I am sharing here. I hope after reading this post you will be able to edit .htaccess file and create. The file is a sensitive file so don’t enter or delete extra coding from the file. Before entering any type of coding in the .htaccess file. Copy all data and save on another location then add additional data in the file. If you are using WordPress and want to create a .htaccess file. Then you can create from CPanel and edit from WordPress dashboard by Yoast SEO plugin. How to access the .htaccess file?

Create .htaccess File WordPress

  • Login your CPanel account and you will see like as shown below. Now find File Manager.

File Manager CPanel

  • Now click on the public_html folder.

Public HTML folder

  • Click on New File icon like shown below and write the name. Hit create a new file.

Create .htaccess file

  • Save this code in the file which you have created.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

I hope this tutorial has helped you to how to create a new file in CPanel root directory. If you want to read about how to create a redirect using CPanel then read here about it by click on the link How To Setup 301 Redirect .htaccess WordPress? This is the file of WordPress which you use to rid off different issues like if you want to create redirect then this file will help you. If you want to secure your website then the file will also help to make secure.

This is the default .htaccess file. Don’t forget to subscribe for latest posts. Just enter your email Id and you will get a notification when any post publish. You will like also WordPress Plugins For SEO Optimization.

AUTHORED BY 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.

Want to contribute