Don’t like the slug WordPress generated for you? Or, perhaps defined in the permalink structure part of the WordPress Admin Section or default .htaccess? For those that don’t know what we’re talking about, we answered what is a slug in WordPress. In short, it’s the part of your website URL that makes a page easily identifiable to both search engines and your visitors. As such, it should be optimized for clarity and optimal length. In the aforementioned article, we also gave some tips on getting the perfect slug and explained why you shouldn’t alter an already published one. So, after we show you how to change a slug in WordPress, only apply it to new pages/posts.
Guide to change a slug in WordPress
These are the main slugs you can change in WordPress:
1. Default WordPress slug
The permalink structure we referred to defines the number and type of slugs in the permalink. The default structure largely depends on the currently active installed WordPress theme but it’s usually set to Plain or Post Name. If you need a quick solution, refer to the Reset your permalinks via Dashboard headline in our WordPress posts returning 404 error fix guide. Otherwise, stay tuned for an in-depth guide on WordPress permalink settings.
2. Post slug and page slug
These two are the slugs you’ll interact with most often, although the former more than the latter. To start, open the list of all pages or posts in the WordPress Admin Section‘s main menu on the left. Now, follow these 3 methods to change a post or page slug in WordPress:
- Click on the name of the page or post, or click on Edit underneath it.
- If you’re using Classic Editor, click on the Edit button next to the permalink below the title. Choose a new name and click on OK.
- If you’re using Block Editor, double-click on the title. The Permalink bar will appear above it. Follow the same steps as with Classic. Alternatively, you can click on the three-dot menu in the top right corner. Under the Document tab, select Permalink.
- Method for Classic and Block Editor. Click on Quick Edit instead of Edit. Change the link under Slug and click on the Update button in the bottom right corner of the menu.
3. Category slug and tag slug
Just like posts and pages, WordPress auto-generates slugs for tags and categories. In most cases, that’s fine. But if such a slug has words that can be removed, you should do it. Here’s how changing a tag or category slug in WordPress works:
- Expand the main left-hand side menu in WordPress.
- Click on Categories or Tags under Posts.
- Click on Edit under the name of a category or tag in the list.
- Modify the slug text field and click on the Update button.
4. Author slug
By default, WordPress sets author slug as https://wpthinker.com/author/author-name. The inability to change the “author” part makes sense. However, why WordPress doesn’t allow users to change the “author-name” slug (which defaults to the username) is beyond us. This is why, if you decide to change an author name, there’s no way to update the slug. Well, unless you install a WordPress plugin, that is. Follow these steps to change an author slug in WordPress:
- Install Edit Author Slug.
- Go to Users > All Users in the main WordPress menu on the left.
- Choose a user and click on Edit underneath the name.
- Scroll all the way down until you find an Edit Author Slug headline.
- Select one of the suggested options. Alternatively, select the Custom option, then enter a custom slug.
- To change the “author” part of the URL, click on Settings > Edit Author Slug in the main menu in WordPress.
- Change the Author Base setting to anything you want and click on Save Changes.
- You need to set up a 301 redirect from the old link to the new. We demonstrated this in method 7 of our guide to find and fix broken links in WordPress.