Posted in

How to Change Permalink In WordPress ? (Link Structure) – Complete Guide

How to Change Permalink In WordPress ? (Link Structure) – Complete Guide
What Is Permalink ?

Your permalink is the web address of every post and page on your WordPress site, and it is one of the first settings you should get right. A clean, readable link helps visitors understand where they are going, helps search engines understand what a page is about, and makes your content easier to share. In this guide you will learn what a permalink is, which permalink structures WordPress offers, how to change the structure for your whole site, how to change the link of a single post or page, and how to avoid the mistakes that cause broken links and lost traffic when you change an existing URL.

The steps below work on any WordPress site, whether you use the Classic Editor or the block editor, and whether you use Rank Math, Yoast SEO or no SEO plugin at all. If your site is brand new, changing permalinks is safe and takes less than a minute. If your site already has published content and traffic, read the section on redirects before you save anything.

Table of Contents

What Is a Permalink?

A permalink, short for permanent link, is the full URL that points to one specific post, page, category or other piece of content on your website. For example, in the address https://www.example.com/how-to-change-permalink-in-wordpress/, the domain is example.com and the last part, how-to-change-permalink-in-wordpress, is the slug. The slug is the part you control most often. Every post and page on your website has its own permalink, and you can see it by opening the content and looking at the address bar of your browser.

How to Change Permalink In WordPress ? (Link Structure) – Complete Guide
The highlighted part of the address bar is the permalink

A permalink is called permanent because it is meant to stay the same for as long as the content exists. Other websites may link to it, people may bookmark it, and search engines store it in their index. That is why it is worth choosing a good structure at the start and changing it carefully later.

The parts of a WordPress URL

  • Protocol: https:// tells the browser to use a secure connection. Every site should use HTTPS today.
  • Domain name: the address of your website, such as smartgyanshare.com.
  • Path or folders: optional parts such as a category name or a date, depending on your permalink structure.
  • Slug: the last, human-readable part that describes the individual post or page.

Why Permalinks Matter for SEO and Readers

Permalinks are not a magic ranking button, but they do affect how people and search engines experience your site. Google has said for years that a simple, descriptive URL structure is easier to crawl and understand, and it recommends using words that people can read instead of long strings of numbers and symbols.

  • Readability: A link like /how-to-apply-for-a-passport/ tells the visitor exactly what to expect before clicking. A link like /?p=2509 tells them nothing.
  • Trust and clicks: When a link is shown in search results, a message or a social post, a clear URL looks more trustworthy than a random one.
  • Keyword context: The words in the slug give search engines an additional hint about the topic of the page, together with the title, headings and content.
  • Easy sharing: Short, clean URLs are easier to copy, type, dictate and paste into chats.
  • Site organisation: A consistent structure makes your site easier to maintain, audit and migrate later.

Permalink Structures Available in WordPress

WordPress gives you several built-in options under Settings > Permalinks. Here is what each one produces and when it makes sense to use it.

Option Example URL Comment
Plain /?p=123 Default on a fresh install. Not descriptive, not recommended for public sites.
Day and name /2026/09/19/sample-post/ Shows the full publishing date. Long, and it makes older posts look outdated.
Month and name /2026/09/sample-post/ Common on news and blog sites that want a date archive in the URL.
Numeric /archives/123 Short but not descriptive.
Post name /sample-post/ Short, clean and flexible. The best choice for most sites.
Custom structure /%category%/%postname%/ Lets you combine tags yourself, for example a category plus the post name.

For most blogs, guides, job sites and business sites, Post name is the best option. It keeps URLs short, avoids dates that can make evergreen content look old, and makes it easy to move a post to a different category later without changing its address.

How to Change the Permalink Structure of Your Whole Site

Follow these steps to change the default link structure for every post on your website.

Step 1: Log in to the WordPress dashboard

Open yourwebsite.com/wp-admin in your browser and sign in with an administrator account. Only administrators can change site-wide settings.

Step 2: Open the Permalinks settings

In the left-hand menu, go to Settings > Permalinks.

WordPress Settings and Permalinks menu
Dashboard > Settings > Permalinks

Step 3: Choose a structure

On the Permalink Settings screen you will see the common structures listed above. If you have never changed this setting, your site is probably set to Plain.

Permalink settings options in WordPress
Choose the structure you want to use

Select Post name unless you have a specific reason to choose something else. If you want a custom pattern, choose Custom Structure and type the tags into the field.

Step 4: Save the changes

Scroll to the bottom of the page and click Save Changes. WordPress updates its rewrite rules and your new links start working immediately.

Save permalink settings in WordPress
Click Save Changes to apply the new structure

Step 5: Test your links

Open a few posts, a page, a category archive and your homepage in a private browser window. Confirm that every one loads correctly and that no page shows a 404 error. If something is broken, see the troubleshooting section further down.

Using a Custom Permalink Structure

With Custom Structure you can combine tags to build your own URL pattern. The most useful tags are:

  • %postname%: the slug of the post or page.
  • %category%: the name of the post’s primary category.
  • %year%, %monthnum% and %day%: the publishing date parts.
  • %post_id%: the unique numeric ID of the post.
  • %author%: the username of the author.

A common choice is /%category%/%postname%/, which produces a link such as /insurance/how-to-compare-car-insurance/. This can help users see where they are on the site, but it also means the URL changes if you later move the post to another category. Always end your custom structure with %postname% or %post_id% so that every URL stays unique. Avoid starting a structure with a tag that is only text, such as a category, on a very large site, because it may add load to the rewrite rules.

How to Change the Permalink of a Single Post or Page

Sometimes you do not want to change the whole structure. You only want to fix one slug, for example to shorten a long title, correct a spelling mistake or add the main keyword.

Edit the permalink of a WordPress post or page
The Edit button next to the permalink under the post title

In the Classic Editor

  1. Open the post or page you want to edit.
  2. Look directly under the title field. You will see the current permalink with an Edit button.
  3. Click Edit, type the new slug and click OK.
  4. Click Update to save the change.

In the block editor

  1. Open the post or page and open the settings sidebar.
  2. In the Summary panel, click the URL field.
  3. Edit the last part of the link and click Update.

With an SEO plugin

Rank Math and Yoast SEO both show the permalink or slug inside their meta box, together with the focus keyword, title and description. You can edit the slug there, but the change is saved in the same place as the standard WordPress field, so there is nothing extra to configure.

What to Do Before Changing Permalinks on an Established Site

Changing the structure on a brand new site is safe. Changing it on a site that already has published, indexed and shared content is a bigger decision, because every old URL will stop being the address of that page. If you do not handle this properly, you can lose rankings and send visitors to error pages.

1. Take a full backup

Back up your database and files before making the change. Most hosting panels offer one-click backups, and you can also use a backup plugin. If something goes wrong you can restore the old settings quickly.

2. Decide whether the change is really needed

If your existing URLs are already readable and working, changing them gives little benefit. The main reasons to change are moving away from Plain or numeric links, removing dates from URLs, or fixing a badly structured category path.

3. Set up 301 redirects

A 301 redirect tells browsers and search engines that a page has moved permanently and sends visitors to the new address. WordPress can redirect some old links to the new one automatically, especially when you move from Plain to Post name, but this does not cover every case and you should never rely on it fully. Use a redirection tool such as the Redirections module in Rank Math, a dedicated redirect plugin, or rules in your server configuration to map old URLs to new ones.

4. Update internal links and your sitemap

Links between your own posts should point to the final URL, not to an address that redirects. After the change, regenerate your XML sitemap and submit it again in Google Search Console so Google discovers the new addresses faster.

5. Monitor after the change

For the next few weeks, check the Pages and Crawl reports in Google Search Console. Look for new 404 errors, drops in indexed pages and unusual traffic changes, and fix them quickly with additional redirects.

Fixing 404 Errors After Changing Permalinks

A 404 error after a permalink change is common and usually easy to fix.

  1. Save the permalinks again. Go to Settings > Permalinks and click Save Changes without altering anything. This regenerates the rewrite rules.
  2. Check your .htaccess file. On Apache and LiteSpeed servers WordPress writes its rules to the .htaccess file in the site root. If the file is missing or not writable, the rules cannot be saved. Make sure the file exists and has the correct permissions.
  3. Check your Nginx configuration. Nginx does not use .htaccess. Your server block needs a line such as try_files $uri $uri/ /index.php?$args; so that WordPress can handle pretty links.
  4. Clear caches. Purge your caching plugin, your server cache and any CDN cache, then test in a private window.
  5. Deactivate conflicting plugins. If the problem continues, temporarily disable plugins one at a time, especially redirect, security and custom post type plugins, to find the cause.
  6. Check custom post types. Content types created by plugins or themes may need their own rewrite rules to be refreshed, which normally happens when you save the permalinks page.

Permalink Best Practices

  • Keep it short. Aim for three to six meaningful words. Long slugs can be cut off in search results and are harder to share.
  • Use lowercase letters. Some servers treat uppercase and lowercase letters as different addresses, which creates duplicate pages.
  • Separate words with hyphens. Google recommends hyphens over underscores or spaces.
  • Include the main topic. Put the main keyword in the slug, but write it for people first. Do not stuff keywords.
  • Avoid dates in evergreen content. A year in the URL makes a guide look outdated when it is updated, and you cannot change it without a redirect.
  • Remove filler words. Words like a, the, and, of are often unnecessary in a slug, but do not remove them if the link becomes unclear.
  • Avoid special characters. Stick to letters, numbers and hyphens.
  • Do not change published URLs without a reason. Every change needs a redirect and carries some risk.
  • Be consistent. Use the same pattern across the site so that visitors and search engines can predict how your URLs are built.

Optional Permalink Settings: Category Base and Tag Base

At the bottom of the Permalinks screen there is an Optional section with two fields, Category base and Tag base. By default WordPress builds archive URLs such as /category/insurance/ and /tag/car-loans/. If you type a different word in the Category base field, for example topics, your category pages will use /topics/insurance/ instead. This is a cosmetic choice. It does not change your post URLs, but it does change every category archive URL, so the same warning about redirects applies on an established site.

Leave the fields empty if you are happy with the defaults. Some SEO plugins, including Rank Math, also have an option to remove the category base from URLs completely. Removing it can create conflicts if a category and a page have the same slug, so test the affected addresses afterwards.

How WordPress Handles Duplicate Slugs and Page Hierarchy

Two posts cannot share the same slug under the same structure. If you publish a second post with the title of an existing one, WordPress adds a number to the end of its slug, so you get /best-credit-cards/ and /best-credit-cards-2/. This is easy to miss, and it is worth checking the URL of every new post before you publish it. Rewrite the slug in the editor so that it describes the specific angle of the article.

Pages work differently from posts because they can have parents. If you set a parent page, its slug becomes part of the URL of the child, for example /services/web-design/. If you later change the parent page slug, all child page addresses change as well, so plan the hierarchy before you build it.

Change the Slug Quickly With Quick Edit

You do not have to open the full editor to fix a slug. In the dashboard, go to Posts > All Posts, hover over the post title and click Quick Edit. The Slug field is in the form. Change it, click Update and the new address is live. Quick Edit is convenient for checking the slugs of many posts, but remember that each changed slug on a published post needs a redirect from the old address.

Does WordPress Redirect Old Slugs Automatically?

When you change the slug of a published post, WordPress remembers the previous slug and usually redirects visitors from the old address to the new one. This built-in behaviour is helpful, but you should not rely on it completely. It works for the last slugs of individual posts, not for a full change of the site structure, and it can be affected by caching, plugins or custom rewrite rules. For anything that matters, add an explicit 301 redirect and test it.

Planning a Redirect Map for a Structure Change

If you are moving an established site from one permalink structure to another, build a redirect map before you save the new setting. A redirect map is a simple spreadsheet with two columns: the old URL and the new URL.

  1. Collect the old URLs. Export them from your XML sitemap, from the Pages report in Google Search Console or from your analytics tool.
  2. Work out the new URL for each. Switch to the new structure on a staging copy of the site, or calculate the new address from the slug and the pattern.
  3. Prioritise. Start with pages that receive traffic or backlinks, then cover the rest.
  4. Import or enter the rules. Many redirect plugins can import a CSV file, or you can add rules one by one. Check which formats your plugin supports.
  5. Keep the map. You will need it if something breaks later.
Old URL New URL Redirect type
/2024/05/how-to-change-permalinks/ /how-to-change-permalinks/ 301
/?p=123 /how-to-change-permalinks/ 301
/archives/123 /how-to-change-permalinks/ 301

The addresses above are only examples. Your own map should use your real URLs.

How to Test Redirects Properly

Opening a link in your browser is not enough, because browsers cache redirects and can hide problems. A more reliable test is to check the HTTP response. If you have a command line, run curl -I https://www.example.com/old-url/. A correct redirect shows a 301 Moved Permanently status and a Location header with the new address. Then check the new address itself, which should return 200 OK.

  • Avoid redirect chains. An old URL should point straight to the final address. A chain such as A to B to C wastes crawl time and slows the visitor.
  • Avoid redirect loops. If two rules point at each other, the browser shows a too many redirects error.
  • Check both www and non-www and both http and https, because they must all end at the same final URL.
  • Update internal links in your menus, widgets and old posts so that they point to the final address and not to a redirect.

Changing Permalinks From the Command Line (WP-CLI)

If your host gives you SSH access and WP-CLI is installed, you can set the structure without the dashboard. The command wp rewrite structure '/%postname%/' sets the Post name structure, and wp rewrite flush --hard regenerates the rewrite rules and the server file. This method is useful on multiple sites or when the dashboard settings page fails to save. Make a backup first, and run the commands on a staging site if you can.

Permalinks and Custom Post Types

Plugins and themes often add their own content types, such as products, portfolios or events. Each one can have its own base, for example /product/blue-shirt/. These bases are defined by the plugin or theme, and their rewrite rules are refreshed when you save the Permalinks screen. If a custom post type shows a 404 error after you install or update a plugin, go to Settings > Permalinks and click Save Changes. If the plugin has its own permalink setting, change it there.

Trailing Slashes: Choose One Style

When your structure ends with a slash, WordPress redirects the version without the slash to the version with it. Search engines treat the two forms as different addresses, so stay consistent in your internal links, canonical tags and sitemaps. Do not switch the style of your URLs after launch unless you also set up redirects for the old form.

After the Change: A Monitoring Checklist

  1. Inspect your main pages with the URL Inspection tool in Google Search Console and request indexing for the most important ones.
  2. Resubmit your XML sitemap so that it lists the new addresses only.
  3. Watch the Pages report for new Not found (404) errors over the next few weeks.
  4. Compare traffic to your top pages before and after the change, allowing a few weeks for search engines to update.
  5. Fix any redirect that leads to a page which is not the closest match, because sending everything to the homepage is treated as a soft error by search engines.

Note that the Change of Address tool in Search Console is meant for moving to a new domain, not for changing a permalink structure on the same domain.

Frequently Asked Questions

Will changing my permalink structure hurt my SEO?

It can, temporarily, if old URLs are not redirected. When redirects are set up correctly and your internal links and sitemap are updated, search engines usually pass most of the ranking signals to the new addresses, although you may see small fluctuations for a few weeks.

Which permalink structure is best for WordPress?

For most websites, Post name is the best choice because it is short, clean and easy to read. News sites that need a date in the URL for archive reasons may prefer Month and name.

Do I need to change permalinks on a new website?

Yes, change them before you publish content. The default Plain structure uses numeric addresses. Switching before you publish avoids any redirect work later.

Can I change the permalink of one post without changing the others?

Yes. Edit the slug in the editor. The rest of your site keeps using the structure from the Settings page. Remember to redirect the old address if the post was already published.

Why do my links show a 404 error after I changed the structure?

The most common reasons are outdated rewrite rules, a missing or read-only .htaccess file, an Nginx configuration without the correct try_files rule, or an old cache. Save the permalinks again, then check the server file and clear all caches.

Should I add the category to my URL?

It is optional. It can show the structure of your site, but it makes the URL longer and it changes if you move the post to a different category. Many sites prefer the simple Post name structure.

How long does Google take to update the new URLs?

It depends on how often your site is crawled. Small sites may see updates in days, while large sites can take several weeks. Submitting the updated sitemap in Search Console helps.

Conclusion

A permalink is a small setting with a lasting effect. Choose Post name for a clean and flexible structure, save the change, and test your links. If you are changing an established site, back it up first, add 301 redirects for every changed URL, update your internal links and sitemap, and watch Search Console for errors. Follow the best practices above and your URLs will stay short, readable and easy for both visitors and search engines to understand.

DMCA.com Protection Status