How to Create .htaccess file for Setting WordPress Permalinks

4
901

Confused with updating .htaccess file? When you try to customize the Permalink structure of your wordpress blog or site, you will be asked  to update the .htaccess file.

You will get this below message when you try to change the permalink structure from the default one.

If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all”.

permalink-structure-for-wordpress-blogs

When I tried to change the permalink structure of this site, the same message appeared and I was confused. The first question was how to find the .htaccess file? After some internet search, I found the answer and thought of posting some information on this topic.

Where is .htaccess file located?

Most of the WordPress users are troubled with this question. If you are familiar with “Filezilla”, it is pretty simple to find .htaccess file. But if you are hearing about Filezilla for the first time, don’t worry. Simply download Filezilla from here. When you open up filezilla, provide the username, password and port number provided by your host in the specific areas. Now you can start changing or updating your files on the remote server.

Usually the .htaccess files are kept hidden. Click on the server option and check the “force showing hidden files” option to view the hidden files.

how-to-view-.htacces-file

If you can see the .htaccess file in the root, right click on it and change the file permissions.

.htaccess-file-wordpressChange the permissions (CHMOD) to 666 with your selected FTP program. now you can retry the permalink update..

how-to-update-.htaccess-file-wordpress

This is the case when .htaccess file is present in the root files. But what to do if you can’t locate the file or such file is not present?

 How to Create .htaccess file?

It is pretty simple to create the .htaccess file using Notepad. Simply make a Notepad file  (with name htaccess.txt) and copy the following code into it.Note that the file extension will be .txt and we will be changing it later after uploading the file to server.

create-.htaccess-file-wordpress

This code appears in the permalink settings page when you attempt to change the Permalink structure. So copy the code and paste into the notepad file.

But how to upload the .htaccess file to the server?

First open up Filezilla, and then click on the “File” option. You will find the “site manager” option. Click on this option and then on the “New site”.

FileZilla-.htaccess-file-uploadNow provide the FTP information the required areas. If you don’t have FTP account on the server, ask your host to provide the account and log in details.

FileZilla-file-upload

Click on the connect button to continue the process. Once a successful connection is established with remote server, you will see a window with two sides (left and right).

.htaccess-file-upload

To upload the .htaccess file, locate the file from the left side of the window. Right click on the file and select “upload” to upload the file into the wordpress site. Note that before you upload, browse the right pane to find the location to upload it. Here you just browse and reach the root, then continue to upload from the left.

After you upload the notepad file, you can see the file on the right side of window. Now right click on the file and rename it as”.htaccess”. That is remove the “.txt” extension and you will get a file with name “.htaccess”.

Congratulations! Now you have created a .htaccess file and uploaded into the server using FTP. Go back to your permalink settings page and save the settings. Check out your website posts, all the posts will have the defined link structure!

If you have any doubts regarding .htaccess file creation and uploading, feel free to ask in the comments section.

4 COMMENTS

  1. Hi, I have problem about Permalink , I just install my wordpress and I’m very beginer for SEO thing can you tell me about how to set up this like
    “domain.com/page/post.html”
    or it can not ?
    and why my New Release Product Blog can not show .html
    and how can I change them ?

    So why my host no need to change .htaccess ?
    What its importance for SEO

    Sorry I’m very stupid in this thing but trying to learn. 🙂

LEAVE A REPLY