Skip to content Skip to sidebar Skip to footer

Simple Guide To Create Custom Permalink in Your Wordpress Site

Simple Guide To Create Custom Permalink in Your Wordpress Site
W3zetmedia - You can customize the structure of permalinks in your wordpress site everytime, however doing this changes the URL of your pages. This can cause your search engine traffic and referral traffic to drop considerably as visitors are presented with 404 page errors instead of the page they wanted to view.


Your WordPress permalink settings can be found in the main settings menu of the WordPress admin area (i.e. http://www.yourwebsite.com/wp-admin/options-permalink.php).

What is a Custom Permalink?

Permalinks are the part of the web address that comes after your domain name and point to specific posts and pages on your site. When set correctly they serve several purposes.
  • They allow your readers to get a brief understanding of what your post or page is about without looking at the content.
  • They are used by search engines to discover the post or page topic solely from the URL.
  • They also supply a permanent location for your visitors and search engines to return to in order to read your content.
  • They are essentially a unique identifier for each piece of content you create.
You set the permalink structure in WordPress from the Settings > Permalinks menu on the dashboard. By default WordPress is set to use the database ID number of each post as the permalink. This is quite an ugly structure and does a terrible job of telling you anything about the content.

Most people will change the default permalink structure of their WordPress blog at its creation. There are several options to choose from, but the most common two choices are the structure that shows the date followed by the post name or simply the post name on its own. This choice is usually made with the intended content in mind. For example, websites that focus on news items tend to have the date as part of the permalink structure.

You would think that since it is easy to change the permalink structure at the creation of a website it should also be a simple process for an established website. While the act of making the change is as simple as selecting a new permalink type and clicking save, the consequences of that action require a little more discussion.

Creating Custom Permalinks in WordPress

There are two ways to creating a custom permalink in WordPress. Often when users are talking about changing the permalink of a WordPress post, they are really talking about the post slug. We will show you how to change the post slug.

But in some cases, users may want to create a completely custom URL structure, and we will also show you how you can do that in WordPress.

Changing WordPress permalink structure

There are two steps in changing your WordPress permalink structure. The first is simple, go to Settings -> Permalinks and select Post name:

If you don’t have the post name option yet, you’re not on WordPress 3.3, the release of which is imminent. You could wait a bit for the update, or you could just add /%postname%/ as a custom permalink structure.

The second step is to redirect your old permalinks to your new ones. To do that, you have to add redirects to your .htaccess file, I have created a little tool that generates these redirects for you based on your domain and your old permalink structure. To use this tool, click the button: 

When you choose one of the five common permalink structures that WordPress suggests, you will see the custom structure field change. The different tags that you see listed in this field are known as structure tags. There are ten structure tags available to you.
  • %postname% – The post slug of your post
  • %post_id% – The unique ID of a post
  • %category% – The category a post was assigned to
  • %year% – The year the article was published
  • %monthnum% – The month the article was published
  • %day% – The day the article was published
You can also use the following tags (though very few websites do):
  • %hour% – The hour the article was published
  • %minute% – The minute the article was published
  • %second% – The second the article was published
  • %author% – The author name
Pretty permalink structures need to include either the post name (%postname%) or the post ID (%post_id%). The post slug refers to the last part of your permalink. It can be edited directly through the post editor.

How To Safely Change The Permalink Structure

If you’ve decided that you have to change your permalink structure, you’ll need to do a few things. The first decision you need to make is the syntax of your new permalink structure. Do you need to include the date? How do you want that to display if you do? Do you plan on using the day or just the month or year as part of your structure?

It is an important decision and you shouldn’t make any changes at all until you have made absolutely sure of your choice. There is a very useful guide to using permalinks in the WordPress codex that can give you ideas for your new structure.

Once you know which syntax you are going to use, it is time to go into the Permalinks menu of your dashboard and make the change. This will now update all of your internal URLs with the new syntax. All of the internal links should update correctly if they have been added as part of WordPress. Any manual links may need to be updated. However, all links to your site from elsewhere will now be completely broken and all the content indexed by search engines will be incorrect.

Post a Comment for "Simple Guide To Create Custom Permalink in Your Wordpress Site"