Couldn’t You Find Your .htaccess File? Create a New One
November 19th, 2015 | by Ravi Chahar || 12 Comments |
When you use self-hosted WordPress platform then there are many things to know for managing your website. WordPress is the boss and it can alter many files according to its own.
Most of the beginners get scared when they get any error message or can’t find any particular file.
In this tutorial, I am going to show you how to create a new .htaccess file? when you can’t find it in your root directory. You may have heard about the name of this file. I am sure you have dealt with it many times.
How To Create A New .htaccess File For Your Website?
Before going further, you should know something about this file. You can easily find this simple file in your “public_html” directory. It tells the server about many things to handle at your website.
It guides the server how to redirect users, how to handle them, how to protect your admin area and more.
I am going to give the answer of this question for you. I know newbies don’t really feel good with these techie things, but you know you can generate .htacces file within few seconds.
First thing if you have the backup of your website then you can find the file in that zip file. You can copy the file and upload it in the directory. As you, all know that it is always recommended that you should have the backup of your website and database.
In case, you don’t have the backup then another way to generate .htaccess file is very simple.
Step 1: The first thing is to login into your wp-admin area of WordPress.
Step 2: Now go to settings>>permalinks and a new page will open for you. There are many options to choose. WordPress will add default permalinks for your website. You can change them if you want.
Step 3: Now is the final step to create a new .htaccess file for your website. You just need to save the default option or the option you have chosen before, and save it.
You have successfully created a new .htaccess file. You can check it in the directory of your website. Just go to cPanel>>files and you can find .htaccess. Make sure that you enable to show the hidden files. The dot before the .htaccess shows that it is a hidden file.
You can change the permalinks according to you. Just select the option and click the save button. Every time you save the permalinks, .htaccess file will be updated.
Just follow the tutorial and you will see a new .htaccess file in the directory of your website. Don’t get panic when you don’t find this file. You can see above that its’ very easy to generate the .htaccess file.
Create A New .htaccess File: Have You Created?
Have you created a new .htaccess file? Have you found the .htaccess file in the directory of your website? If you still don’t see any file with this name then check if you have enabled to show hidden files.
The final solution is to check the permissions. You should enable to read and write the files of the directory by the administrator. Make sure that you have allowed to see the files of the directory by yourself. If you still can’t find the .htaccess file then you should talk to your web hosting company. they will do something for you.
If you still can’t find the .htaccess file then you should talk to your web hosting company. they will do something for you.
I hope the tutorial was useful for you. If you still face any problem then feel free to ask anything you want. I will be happy to help.