/
/
How to Keep WordPress Permalinks From Changing When I Modify Posts
ADVANCED GUIDE – PROCEED WITH CAUTION
This guide is more technically advanced and may require an additional level of knowledge beyond everyday website operation. If you have difficulting following this guide, or want further assistance, please contact our team using the chat link at the bottom of your screen. When in doubt, chat before you click.
Without a proper permalink setup, you can run into issues later on if you decide to reorganize your blog post content. This guide will help you to understand when permalinks change, and how to set up your WordPress installation to give you the most flexibility while maintaining stability in your SEO and visitor experience.
When Do Permalinks Change?
Permalinks for posts and pages will change when variables used within the permalink structure change.
To simplify this, let’s breakdown the anatomy of a permalink:
https://www.yourwebsite.com/blog/%post_id%-%post_name%
- Section 1: ‘https://www.yourwebsite.com’
This is the main URL of your website. (Unless you change the Site URL of your WordPress installation, and subsequently the DNS records for the associated domains attached, this will alwasy remain the same.) - Section 2: ‘/blog/%post_id%-%post_name%
This is the permalink structure itself, which follows the main Site URL. In this example, all posts will have:- The /blog/ slug
- Followed by %post_id%-%post_name%
- %post_id% is a variable provided by WordPress that will automatically populate the internal post ID number within WordPress. This is unique to each post.
- %post_name% is a variable provided by WordPress that will automatically populate the post slug (Labeled ‘Permalink’) specified under the title in the Edit Post window.
So when would this link change? Any time you adjust a variable by changing something within WordPress. If you’re utilizing the Category, Author, Post Name, or Time fields, these values can be changed, and when they are, the URL of your article will change as well.
How To Correct Unwanted Permalink Changes
To set up your permalinks in a way where they will not change when you adjust category, tag, or author, you will need to follow these steps.
Please note that following the steps in this guide may result in the public URLs for your content changing on the web. This may cause website content to become unavailable if the appropriate redirects are not installed after this change to ensure that any traffic routed to your old URLs ends up in the appropriate location.
- From your WordPress Dashboard, go to Settings > Permalinks
- Under Permalink Structure, adjust your structure to match the following:
- If you want your posts’ URLs to have a high chance of uniqueness, with minimal chance of changing:
Select Custom Structure, and enter in the following value after your site URL:/%post_name%/
This will generate a permalink structure that looks like (/your-post-name) in the address bar
- If you want your posts’ URLs to have a guarantee of uniqueness, with minimal chance of changing:
Select Custom Structure, and enter in the following value after your site URL:/%post_id%-%post_name%/
This will generate a permalink structure that looks like (/19284-your-post-name) in the address bar
- If you want your posts’ URLs to have a high chance of uniqueness, with minimal chance of changing:
Permalink Change Note:
Your permalinks for your website posts will only change if you adjust the slug (Labeled Permalink) specified under the title in the Edit Post screen.