If you have ever seen a strange URL like https://example.com/?p=123 and wondered how to turn it into something clean like https://example.com/what-is-a-permalink-in-wordpress/, you are really asking about permalinks. In WordPress, the permalink is the permanent URL for a specific post, page, or piece of content.
Getting permalinks right is important for usability, branding, and search engine optimization (SEO). In this guide, you will learn what a permalink is in WordPress, how it is structured, how to configure global permalink settings, how to edit individual URLs, and how to fix common permalink problems.
If you are completely new to the platform, you may also want a quick refresher on what WordPress is and how it works before you start changing URL settings on a live site.
Prerequisites
You do not need to be a developer to understand and configure permalinks, but a few basics will help you follow along smoothly.
- Access to your WordPress admin dashboard (typically at
/wp-admin). - An Administrator-level user account so you can change Settings.
- A recent backup or a staging site if your site is already receiving traffic (recommended before changing URLs).
Step 1: Understand What a WordPress Permalink Is
A permalink (short for “permanent link”) is the full URL that points to a specific piece of content on your WordPress site. Visitors use it to access the page, and search engines use it to index and rank that content.
In WordPress, permalinks are used for multiple content types:
- Blog posts (your main articles).
- Pages (static content like “About” or “Contact”).
- Custom post types (e.g., products, events, portfolios).
- Taxonomies such as categories and tags.
Permalinks matter because:
- They help users understand what a page is about before clicking.
- They provide context for search engines and can include keywords.
- They are shared in emails, social media, and other websites, so changing them later can break links if redirects are not set up.
Step 2: See How a Permalink Is Structured
Consider this example URL:
https://example.com/blog/what-is-a-permalink-in-wordpress/
It is made up of several parts:
- Protocol and domain:
https://example.com– your main website address. - Path or subdirectory:
/blog/– optional folders or structures you define. - Slug:
what-is-a-permalink-in-wordpress– the part that uniquely identifies this post.
The permalink is the entire URL, while the slug is just the final part after the last slash. If you want to dive deeper into slugs themselves, see the dedicated guide on what a slug is in WordPress.
Step 3: Configure Global Permalink Settings
WordPress generates permalinks based on a global structure that you can configure in the Settings menu. This structure controls how URLs are built for posts and sometimes other content types.
- Log in to your WordPress dashboard as an Administrator.
- In the left-hand menu, go to Settings > Permalinks.
- On the Permalink Settings screen, review the available options:
- Plain: Uses a query string, e.g.,
?p=123. Not recommended for SEO or readability. - Day and name / Month and name: Include dates in your URL, e.g.,
/2025/01/03/post-title/. - Numeric: Uses post IDs inside the path.
- Post name: Uses just the slug, e.g.,
/post-title/– the most popular, clean, and SEO-friendly option for most blogs. - Custom Structure: Lets you define your own pattern using tags like
%category%and%postname%.
- Plain: Uses a query string, e.g.,
- Select Post name for a simple, readable URL structure (recommended for most sites).
- Scroll down and click Save Changes to apply the new permalink structure.

Step 4: Edit Permalinks for Individual Posts and Pages
Even after you define a global structure, you can still customize the permalink for each post or page by editing its slug. This is useful for shortening URLs or refining them around your focus keyword.
- Open the post or page you want to edit in the WordPress editor.
- Locate the Permalink or URL section near the top of the editor (it may be under the title or in the sidebar, depending on your editor and theme).
- Click the Edit button next to the slug.
- Enter a short, descriptive slug using:
- Only lowercase letters and numbers.
- Hyphens (
-) to separate words. - No spaces, underscores, or special characters.
- Click OK or press Enter, then update or publish the post to make the new permalink live.
Step 5: Create SEO-Friendly Permalink Structures
Permalinks are not the only ranking factor, but well-structured URLs help users and search engines understand your content quickly. Combine solid permalink practices with broader optimization from a guide like the WordPress SEO beginner guide.
- Include your main keyword: Add your primary topic or keyword to the slug, but avoid stuffing multiple similar keywords.
- Keep URLs short and descriptive: Aim for 3–6 words that clearly describe the content.
- Use hyphens, not underscores: Search engines treat hyphens as word separators, which makes the URL easier to parse.
- Avoid filler words where possible: Words like “and”, “the”, or “of” can often be removed, as long as the URL still makes sense.
- Do not change URLs without a plan: If you must update an existing permalink, map out 301 redirects first to avoid losing traffic.
Step 6: Fix Common WordPress Permalink Issues
Sometimes permalinks stop working as expected, especially after migrating a site, changing settings, or installing new plugins. Here are common issues and how to fix them.
404 errors on all posts and pages
If your homepage loads but all posts return a 404 error, your permalink rules may not be registered correctly.
- In the WordPress dashboard, go to Settings > Permalinks.
- Without changing anything, click Save Changes to force WordPress to “flush” and regenerate its rewrite rules.
- Clear any caching plugins and your browser cache, then test your URLs again.
Flushing permalinks with WP-CLI
If you have command-line access to your server and WP-CLI installed, you can flush permalinks from the terminal.
Run this command over SSH in your site’s root directory:
wp rewrite flush --hard
This forces WordPress to rebuild permalink rewrite rules, which can fix many 404-related issues after changes to plugins, themes, or custom post types.
Issues related to .htaccess or server configuration
On Apache servers, WordPress usually stores permalink rewrite rules in an .htaccess file. If this file is missing or not writable, permalinks may fail.
- Ensure the file
.htaccessexists in your site’s root and that your web server user has permission to write to it. - Check with your hosting provider if you are unsure how to manage file permissions or rewrite rules.
.htaccess or server configuration incorrectly can take your site offline. Always back up the file before making changes, and ask your host for help if you are not comfortable editing server files. Finalize Your WordPress Permalink Strategy
Permalinks are more than just technical details in the background of your WordPress site. They shape how visitors, search engines, and other websites see and share your content.
By understanding what a permalink is, choosing a sensible global structure, customizing individual slugs, and knowing how to fix common issues, you can keep your URLs clean, readable, and SEO-friendly. Set your permalink strategy early, stick to it consistently, and handle any necessary changes carefully with redirects and thorough testing.
Further Reading
- How to Do On-Page SEO in WordPress
- WordPress SEO: Complete Beginner’s Guide
- Internal Linking in WordPress for Beginners
- Internal Linking Strategies for WordPress
Frequently Asked Questions
What is the difference between a permalink and a slug in WordPress?
https://example.com/blog/what-is-a-permalink-in-wordpress/. The slug is only the last part of that URL, such as what-is-a-permalink-in-wordpress. WordPress uses the slug (combined with your permalink structure) to build the complete permalink. Is it safe to change my permalink structure on a live WordPress site?
How do I fix 404 errors after changing permalinks?
.htaccess file or server rewrite configuration, and contact your host if needed.




