How to Change Permalink Structure in wordpress

Advertisement:

I know this is a small thing to many people out there, but I am writing about this for the beginners. I had also faced lot of problem in changing the permalink, when this blog was hosted in Yahoo! server.

Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to link to your article (or section), or how you might send a link to your story in an e-mail message. The URL to each post should be permanent, and never change — hence permalink.

To change the permalink structure, first you need to grant permission, to access the .htaccess file(It should be in writable mod). To do that, log into your hosting account using any FTP software...we recommend using "FileZilla". As it is a FREE software and a good featured one and yet so simple to use.

FileZilla-server-name-user-name-passowrd-field
Ask for the host name to your hosting support team or search in their blog. Username and password will usually be the same as the username and password of your hosting account cpanel.

After logging into your Hosting account through “FileZilla”, goto the folder, where you have installed your wordpress theme, select .htaccess and index.php files and then right click and select “File Attributes”..Now change the Numeric value from 644 to 666. This would grant the writing mode to those two files.

And there is a .[dot] in the beginning of the file name .htacess, that file many not be visible. In this case change the settings to show all the files. or you can ask about it to your web host support team.

FileZilla-index.php-file-attributes

Now you can simply log into your wordpress account and then click on the “settings” tab, and then click on the Permalinks tab.
permalinks-wordpress-setting

There choose which ever format you want your permalink to be.

If you don’t like any of those, then select the “Custom Structure”, as shown in the above image. Now specify whatever structure you want…

Make sure to end your permalink structure with either %post_id% or %postname% (e.g. /%year%/%monthnum%/%day%/%postname%/) so that each permalink points to an individual post.

%year%
The year of the post, four digits, for example 2004
%monthnum%
Month of the year, for example 05
%day%
Day of the month, for example 28
%hour%
Hour of the day, for example 15
%minute%
Minute of the hour, for example 43
%second%
Second of the minute, for example 33
%postname%
Shows only the post name after your blog URL.
%post_id%
The unique ID # of the post, for example 423
%category%
A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.
%author%
A sanitized version of the author name.

Now choose any one of these or the combination’s of these and put it  in the “Custom Structure”, and make sure to end your structure with either %post_id% or %postname% .

Ex:-

/%day%/%postname%/

Now press “Save Changes” button. Thats it. You have setup the permalink structure of your choice. Congrates!

And now don’t forget to change the file permission of .htaccess and index.php files to 644 again, for security purpose.

If you still face any problem with this, then it would be better to contact your hosting provoider.

And you may also feel this plugin interesting to redirect the older permalink structure to the new one’s without any hassle.

For more details about this click here.

You could also be interested in reading Permalink contribution for duplicate content.

15 thoughts on “How to Change Permalink Structure in wordpress”

  1. @Amit Banerjee, This http://scott.yang.id.au/code/permalink-redirect/ WordPress plugin may help you.
    It replies a 301 permanent redirect, if requested URI is different from entry’s (or archive’s) permalink. It is used to ensure that there is only one URL associated with each blog entry.

    I have also mentioned about the redirection in the above article, by giving link to one of the plugin, just check it out again.

  2. Satish i have tried all of them but getting error messages “The system cannot find the file specified”.

    Later i included index.php in the permalink structure and it worked.

    i have read that to remove index.php you should change the .htaccess file.never found anything like that on my server.However i do not use filezilla.I use cuteftp and it has no option to change the file attributes.I am going to try Filezilla soon
    By the way the translator script is a good find.can you share me the code or tell me how to install it ??

    Many thanks

  3. Amit, I think “cuteftp” is not a free or open source software. I have been using “FileZilla” from beginning.
    Hope you need to ask your host and create .htaccess in your server, if its not present. And be careful, because overwriting the previous .htaccess(which might be a hidden file) will result in very bad results, so ask your host before creating .htaccess file in your server.
    You should really start using “FileZilla”, its very easy to use and has lot of features(as it is a open source software).

    And about translator script — I have already shared it with everyone at http://technotip.org/add-langu.....r-website/

  4. Hi! I´ve contacted my Hosting provider (ALPSHOST.COM) and they told me they dont support .htaccess edit…I think because it is a Windows primary based Hosting.

    Is there a workaround for me? I am migrating some Blogger Blogs to WordPress as it is much more flexible and I want to hold the same Permalinks I use to have in Blogger so I dont loose any linkback and indexed posts.
    Thanks for anyone for your help!

  5. @Satish, thanks for the info, it seems that the only way my Hosting Provider would let me support htaccess like solution is by installing a Comercial Version of one of the following applications:

    IIS Mod-Rewrite
    ISAPI_Rewrite
    URL Rewrite
    IIS Rewrite

    I´ve contacted my Hosting provider (www.alpshost.com) and asked if they could implement one of them, they told me they have to purchase licenses for 14 WebServers they actually have…

    I guess I just have to stand by to wait for them to make the investment…If anyone has a solution (better a free solution) so I can get this running, would be really cool.

    Thanks a lot!

  6. Wow. Cool. I didn’t know that I had to change the permissions of the index.php file. This helped a whole lot. Now I got my posts just how they are supposed to be.

  7. @Fernando, Thanks for the info. Will let you know more, if I come across any resource which may be of use for you. And please comeback and leave your valuable comment here, if you get the solution somehow. Thanks for your comments.

    @Dj RaYz, Glad to know that it helped you.

Leave a Reply