Everything you need to know about the slug in WordPress

You must have noticed that the links to your site pages differ from one page to another, and you must have heard of the concept of the slug (the nice name), which is considered one of the important things in WordPress, and which many website owners ignore, and do not take advantage of to improve links. Their website pages.

For this reason, we have prepared this article in which we will introduce you to the concept of the cute name (Slug), and explain to you in practical terms the methods used to define and change it. We will also give you some important advice in order to choose a cute name suitable for the pages and articles of your site.

What is a slug in WordPress?

A slug is part of the URL for a page, category, or product on the site, and comes after the domain name of the website. For example, if we have the following link: (https://www.wppr.com/secure-wordpress-theme/) then the last part of it is the slug for this page and here it is (secure-wordpress-theme) .

The main benefit of the nice name (Slug) is to classify the page or article within the site to facilitate use. It is also useful in clarifying the content for visitors and search engines. It can be likened to the name of a file on your computer. Based on its name, you can know what this file contains, and this is what makes it An important thing.

WordPress assigns a slug name to the page, article, or category by default before publishing. It is often identical to the title of the page or category, and you can easily change it either before or after publishing.

In addition, you can follow some tips in order to select a distinctive slug that will help you improve the ranking of your site’s pages and articles, ensuring better results and a greater number of visits.

It is worth noting that the slug does not accept spaces, and when you change it you must use lowercase letters, numbers, and dashes only. If you use spaces, WordPress will automatically replace them with underscores.

What is the difference between slugs and permalinks in WordPress?

Permanent links in WordPress are the link that points to your site, articles, or publications, and all sections of the site must have their own permanent link. The slug is the last part of the link and often represents the title of the article or page, as we mentioned previously.

You can modify permalinks in WordPress by clicking on the ( Permanent Links ) tab that appears when you place the mouse cursor on ( Settings ) in the WordPress control panel .

After that, the page for permanent link settings will appear to you, and within it you will find a number of default options provided by WordPress for the permanent link combination. You can choose any combination that you deem appropriate. As for changing the slug name, we will mention how to change it in practice later in this article.

How to change the structure of permalinks in WordPress

Slug types in WordPress

There are many places where you can find slugs, and in all cases their goal is the same, which is to express the content. The most important types of slugs are:

  • The slug for the article or page: This is the slug for the blog or website posts or pages. 
  • The slug for categories or tags: It expresses the nice name for a category or tag, and the method for specifying it differs from the slug for the article or page.
  • The slug for a site member’s archive: This is the nice name that expresses the archive pages of the site’s book, and you need to use a WordPress plugin in order to change it.
  • The product slug: It is very similar to the article slug, but differs in the way it is changed.

How to change the slug in WordPress

The method for changing the pleasant name of a page or post is different from the method for changing it for categories and tags , and below we will explain to you the two methods:

1. How to change the slug for a page or post

You can easily change the slug of a page or post on WordPress, while editing the page or post. When you write the title of the page or post and click ( Save Draft ), in the side menu you will find an option called (Link) and next to it you will find the link to the post. Or the page you’re writing.

As we mentioned previously, WordPress determines the slug to match the title of the page or article by default. In order to change it, click on the link in the side menu, and then the Nice Name field will appear for you and you can change it to any name you want.

How to change the nice name for articles or pages

2. How to change the slug for categories or tags

The slug for a category or tag is changed in the same way, depending on which tab you click on in the WordPress control panel (categories or tags). For example, if you want to change the nice name of a category, you must first log in to the WordPress control panel and then Click on the ( Categories ) option within the drop-down list that appears when you place the cursor on ( Articles ).

After that, the settings page for categories will appear. You can easily specify the nice name for a new category by writing it in the right designated for it while creating this category.

How to specify a nice name for a new category

If you want to change the slug for one of the old categories on the site, click ( Edit ) on the tab of the category you want to modify.

Click Edit to go to the classification settings

After that, the settings for this category will appear to you and include a field for the nice name, which you can modify to any name you want.

How to change the cute name of an old category

Tips for improving and choosing an SEO-compatible slug

There are many things that can be exploited in order to choose a suitable Slug compatible with SEO for your site’s pages. Below we will mention to you the most important of these tips, which will undoubtedly help you improve the ranking of your site’s pages and articles and guarantee you a greater number of visits.

  • Include the page’s keyword within the slug: It is very important to include the page’s keyword within its nice name, because search engines examine the page’s URL in order to determine its content.
  • Make the slug short and simple: You should not make the name of the page or post long, even if its title is long. Rather, you should make it short and simple, because this will be easier to use and will guarantee you good results in ranking your site’s pages.
  • Do not use dates and numbers in the slug: Using dates within a nice name may make it unimportant after a long time, as more recent pages or articles will have been published for the same topic, which will reduce the importance of your page or article. As for using numbers It is not considered a good thing, because it may change in the future. For example, if the title of your article is “The 5 Tallest Towers in the World,” make the pleasant name “The Tallest Towers in the World,” because in the future it is possible that towers taller than those in the article will be built.
  • Do not change the slug after publishing it unless you have to do so: changing the nice name of a page or article will change its URL, and therefore all previous links to it will be broken, and this can lead to a decrease in the number of visits to the page and a decrease In order, but if you are forced to change the slug, you can avoid problems that may occur by redirecting to the new link.
  • The nice name must be relevant to the topic of the page or article: The nice name must not only contain the keyword, but it must also be relevant to the topic of the page or article and express its content.

Thus, dear reader, we have introduced you to the concept of the slug name, explained to you how to define and modify it in a practical way, and also provided you with some important tips that you can use in order to choose the most appropriate slug for the pages and articles of your site to ensure improving their ranking and gaining a greater number of visitors.

Avatar photo
I am a young man who has been working in WordPress and e-marketing for 10 years. I would like to share my experience with you so that we can become professional in WordPress I will be happy to share the experience with you.