How To Change The Permalink Structure Of Your Wordpress Blog
ByIn this tutorial I am going to teach you how to change the permalink structure of your Wordpress blog.
Changing the permalink structure of your wordpress blog will help to optimize it for the search engines. It is very important that the title of each post contains the main keywords you are targeting within the post. Otherwise changing the permalink structure will be of no benefit.
If you don’t know what permalink structure is look at the URL of this post. You will see my domain name, followed by the category name, followed by the post title. By default wordpress gives posts and pages a post id. If I hadn’t changed the permalink structure of this blog then the URL would look something like this yourblogbuilder.com/?p=1.
There are many ways you can structure your blog but I always use mydomainname.com/category/postname/ so that is what I am going to use in this tutorial.
For this to work your hosting must have the mod_rewrite module installed most will but if you don’t have hosting yet and you need hosting click here. Also the .htaccess file in the root of the blog must be writable (don’t worry if you have no idea about this I will show you how to check).
Step One
Check the .htaccess file is writable and has sufficient permissions.
Open up your ftp software I am using filezilla in this example.
In the root of your blog you should see a .htaccess file.
If you cannot see it you may need to show hidden files in your ftp software using filezilla you would do this:

Now you should be able to see the .htaccess file.
Right click the file and select File Attributes (other ftp software may say permissions).

This will open the change file attributes window, check what the numerical value is set at if it’s 644 or above that should be ok. If below 644 change to 644 and note the original figure so you can change it back later.

Step 2
Log into your wordpress dashboard and select the settings tab then click Permalinks.

This will open the permalinks screen.
Select Custom Structure and enter /%category%/%postname%/ if you wish to use the same structure as me, you can learn more about other structures under the section Structure Tags on this page.
Select save changes.

You should then see the Permalink structure updated message:

Congratulations you have updated your wordpress blog permalink structure.
If you see anything other than that such as You may need to update your .htaccess file now or If the .htaccess file were writable we could do this automatically, then it probably hasn’t updated the file.
In this case download the .htaccess file to your computer using your ftp software and open the file in notepad or whatever you use to read txt files. Somewhere in the .htaccess file you should see the following:

If your .htaccess doesn’t contain the above then you need to add it exactly as you see it above, after any text that is already in the file.
Save the file make sure you save it as .htaccess and that the save as type is all files not .txt
Then upload to the server and overwrite the current one.
If you need more information on permalinks structures and troubleshooting you can check out the wordpress codex.
Tools used in this wordpress tutorial:


what a great site and informative posts, I will add a backlink and bookmark your site. Keep up the good work!
Hi Pete,
I have changed my permalinks to category/post but everytime I click on a post or page link on my blog it goes to a 500 Internal Server Error page.
Jenny
Hi Jenny,
It could be an issue with your .htaccess file.
Check it exists in the folder your wordpress software is installed in.
If it does exist, download it and check it has the following code in:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Then save the file and upload it replacing the one that is there.
If it doesn’t exist first check your ftp program is showing hidden files.
If you are definitely sure it doesn’t exist:
Open notepad copy and paste the code above save the file as .htaccess, make sure Save as type is set too All Files (*.*)
Then upload the file to the directory wordpress is installed in on your hosting account.
Pete