Javatpoint Logo
Javatpoint Logo

WordPress Permalink

It is the permanent URL for individual blog posts, categories and other lists on our WordPress site. Permalinks will help to link the article with another weblogger and send a link to our story in an e-mail message. The URL for each post or site must be permanent and can never be changed. Permalinks are also known as a pretty link. By default, WordPress URLs use the format of the query string which looks like as below:

In this example, N is the Post ID number of the site. It works in all the server environments, but it doesn't look as good as other options.

However, we can modify the settings to change those query strings into human-readable strings by going to Settings >> Permalinks options page. For example:


WordPress Permalink

Why are permalinks so important in WordPress?

It allows the world to recognize the different content pieces in a blog via the permalinks. There are some instances that help us to know why permalinks are so important in WordPress:

  1. If any blogger wants to connect with the post content, they point to one of the Permalinks.
  2. If we want to share the social media platform's content, we can share the permalink.
  3. If Google wants to index a piece of our content, the permalink will be used.

How to Set the Permalinks in WordPress?

It is easy to set the permalinks in WordPress. We can do it in two ways:

  1. We can set up a permalink structure just after launching a new WordPress site.
  2. For every piece of content, we can set the Permalinks individually.

Permalinks Structure Tag in WordPress

We can use these structure tags to customize the permalinks. The following structure tags are used in WordPress:

Year

It is the year of the post, for example, 2020

Monthnum

It is the Month of the year, for example, 07

Day

It is the day of the Month, for example, 15

Hour

It is the hour of the day, for example, 12

Minute

It is the minute of the hour, for example, 35

Seconds

It is the second of the minute, for example, 49

Post ID

It is the unique ID of the post, for example, 267

Post name

It is the title of the post that is used in the post or page panel.

Category

A sanitized version of the category name which is used in the category panel.

Author name

A detailed version of the author's name.

How to set the permalink structure in WordPress?

Setting up a simple permalink structure

To set the permalink structure, go to the wp-admin >> Settings >> Permalinks. Once we reached there, select the "post name" option.

WordPress Permalink

Adding Custom Permalinks

Permalinks are easy to set up using custom structures. These are permalinks, which end with the extension of .html or .php.

A user migrates to their website with the .html extension in the URL of the post and wants to keep everything almost the same.

Now, we will follow the same steps mentioned above. Here we will use the custom structure. The website will have the following code for the custom structure:


WordPress Permalink

Input the code in the Custom Structure box if we don't see it, and click on the Save Changes button.

Once we are completing all these steps, we can open it by navigating to Settings and then Add Any Extension to pages. Next, we need to enter the .html or any other extension that we want to add and then click on the Update Setting button.

The custom permalink's final step is to go back to the Settings and permalink (Setting >> Permalink), and then click on the "Save Change" button without making any changes to the settings. It will reset the permalinks, and a needed step to make a new extension work with the WordPress site.

How to set the Permalinks for posts and pages?

Once we complete the Permalink structure setup, we may tweak the different posts and pages. It can be done via every individual page's and post's editing screen. When we edit the content, we can see this small area directly below the title field.

We can change the permalink by clicking the "Edit" button. A box appears, and we can place whatever we want.

WordPress Permalink

However, it is standard to use the full title or some simplified version of a given post.


Next TopicWordPress Editor




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA