Permalinks

Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change — hence the name permalink.

The Settings → Permalinks screen allows you to choose your default permalink structure. You can choose from common settings or create custom URL structures. You must click the Save Changes button at the bottom of the screen for new settings to take effect.

By default, WordPress uses web URLs which have day and name in them; however, WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links.

Settings Permalinks
The SettingsPermalinks screen.

Common settings

Check one of the radio buttons corresponding to the correct Permalink Structure for your blog.

  • Default: An example of the default structure is http://www.sample.com/?p=123, where the number represents the post ID.
  • Day and name: An example of the day and name based structure is http://www.sample.com/2008/03/31/sample-post/.
  • Month and name: An example of the month and name based structure is http://www.sample.com/2008/03/sample-post/.
  • Numeric: An example of the numeric structure is http://www.sample.com/archives/123.
  • Post name: An example of the post name structure is http://www.sample.com/sample-post.
  • Custom structure: In the box specify the custom structure you desire to use. One example is /archives/%year%/%monthnum%/%day%/%postname%/.

While it’s most likely one of the default structures will be sufficient for your site, you can read about custom structures in the Structure Tags section of the WordPress documentation.

Optional

You may enter custom bases for your category and tag URLs here. For example, using /topics/ as your category base would make your category links like http://example.org/topics/uncategorized/. If you leave these blank the defaults will be used.

  • Category base: Enter a custom prefix for your category URLs here.
  • Tag base: Enter a custom prefix for your tag URLs here.

Saving your changes

Click the Save Changes button to ensure any changes you have made to your Settings are saved to your database. Once you click the button, a confirmation text box will appear at the top of the page telling you your settings have been saved. After you’ve clicked this button, you should receive one of two messages depending on whether your .htaccess file is writeable. For information on how to make .htaccess writeable, see Changing File Permissions.

If .htaccess is writeable, you will get a message that says “Permalink structure updated.” You’re all set; WordPress has been able to do everything for you automatically.

If .htaccess is not writeable, you will see a message at the top of the screen that says “You should update your .htaccess now.”.

Near the bottom of the screen you will see “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.” This means you’ll have to do one extra step yourself. In the text box at the bottom of the Screen, WordPress displays several lines of rewrite rules associated with the Permalink Structure you designated above. You need to manually copy everything in this text box into your .htaccess file to make your new Permalinks work.

Visiting the Permalinks screen triggers a flush of rewrite rules. There is no need to save just to flush the rewrite rules.

If you’re writing your .htaccess file on your own local computer, remember, some operating systems do not allow the creation of a file named “.htaccess” because of the initial dot (“.”). You can always name the file without the initial dot or with a standard extension (e.g. “htaccess.txt”). Once the file is uploaded to your weblog’s directory, rename it with your FTP software. Most FTP Clients should provide you a way to rename files this.

Files that begin with a dot (“.”) like “.htaccess” are hidden on most servers by default. Consult the userguide or FAQ of the FTP software you use to find out how to have the software display these hidden files, and also how to use the software to change file permissions, rename files, etc.

WPlook Themes

Can't find what you're looking for?