WordPress For Noobs – Part 3: Permalinks
Posted: June 27th, 2008 | Author: Patrick | Filed under: Tutorials, WordPress Help, WordPress for Noobs | Tags: permalinks, WordPress for Noobs |Welcome back to our WordPress For Noobs tutorial series everyone! If you have missed any of the previous entries in the series, check out the Features page. You can also find other special features there. Please contact me if you have any questions or suggestions.
Permalinks are a very important part of your WordPress based web site. Your WordPress site is different from a static web site in the fact that information is being pulled out of a database to create your pages. This is known as a dynamic web site. Since a page may have the same layout but wildly different information, it won’t be using easily human readable filenames. This brings up a few problems. How do you link to a given page of information if it doesn’t have a set filename? What are the implications on how search engines index the site?
This is where permalinks come in. By default, WordPress assigns a name to your pages to that is knows where to find them. This setup looks like this: http://www.example.com/?p=123. WordPress is saying to the web server “Give me the page with an id of 123”. Makes sense right? You can link to this, as it will never change (unless you change your permalink structure). That solves one problem. But what does Yahoo or Google think about that? It can’t really discern anything about the page’s content from that.
WordPress comes to the rescue once again! You can specify how you want WordPress to describe these pages. When you make a change in how WordPress describes these pages, it makes a change to your .htaccess file. This file can “sculpt” how your page’s filenames are described. You can edit the .htaccess file on your own, but I recommend just sticking with changing it from inside your WordPress admin. In order for WordPress to be able to change this file, ensure that your .htaccess file is writable.
On your Permalinks page, WordPress gives you a few different options by way of a radio button. You can also find other options to specify a custom structure at the Using Permalinks page in the WordPress Codex. So what structure should you use? I decided to use a /%category%/%postname%/ structure. I figure this keeps the URL’s that are output good information to let the search engines index, but not horribly long either. Your URLs will end up looking like http://www.example.com/categoryname/postname/. I see a lot of sites that use this structure, and Google indexes this site very quickly, so I recommend something along those lines.
Some of the other things you need to keep in mind:
- Anytime you edit the permalink structure in the WordPress admin, refresh the page so it takes.
- Be very careful when editing the .htaccess file as making a mistake can be hard to fix.
- The .htaccess file is found in the root directory of WordPress.
These are the basics of editing the permalink structure of your WordPress site. Stay tuned for the next installment in the WordPress for Noobs series and more information about permalinks.

RSS
Thanks !