How To Create Pretty Permalinks In WordPress
This is the second article in the WordPress tips series and it deals with permalinks. Permalinks in WordPress refer to the permanent URL for posts. By default, WordPress uses question marks and alphanumerics in permalinks making them ugly, non-memorable and not search engine friendly. For example, the default URL for this post would be http://www.kuzzuk.net/?p=36.
However, WordPress provides a way to customize permalinks that are search engine friendly and memorable. This page has a number of tags with examples on how you can customize your permalinks. Here are the steps to customize your permalinks.
- Log into your WordPress administrator account and click the “Permalinks” link under “Settings” on the left panel.
- As shown below, there are a number of “Common settings” to chose from including 1) Default, 2) Day and name, 3) Month and name, 4) Numeric and 5) Custom. You can chose any of the options, I would recommend you chose any option other than the default option with the custom option being the most flexible. In my case, I have set the custom option as /%postname%.html which makes my URL like http://www.kuzzuk.net/how-to-create-pretty-permalinks-in-wordpress.html.

Wordpress Permalinks Settings
- After choosing the desired setting, click the “Save Changes” button.
What If the Permalinks Do Not Work?
If the permalink doesn’t work then it is most likely because of the .htaccess file permission issues (assuming the server is Apache). Open the .htaccess file and add the following code (if WordPress is installed in the root directory):
# BEGIN WordPressRewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]# END WordPress
Open the .htaccess file and add the following code (if WordPress is installed in a directory called ‘blog‘):
# BEGIN WordPressRewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]# END WordPress
In most cases, the permalinks settings should work without having to mess with the .htaccess files. Please leave a comment, if you have questions or feedback.
If you need my assistance with WordPress design or development then please do contact me. I live in Singapore (+8GMT) so there may be slight delays in answering queries.


