WordPress Permalink Setting

My First Heading

My first paragraph.

geeksforgeeks

  • Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech

WordPress Permalink Setting

Last Updated : 05 Sep, 2024

Permalinks, or permanent links, are the URLs used to link to your content in WordPress. They help in making your content structured and accessed by users and search engines. You can navigate to WordPress permalink settings by going to Dashboard -> Settings -> Permalink. It looks something like the picture below. ( my WordPress installation directory is WordPress on localhost).

What Are Permalinks?

Permalinks are the permanent web addresses used to link to your posts, pages, categories, and other content on your WordPress site. They are designed to remain unchanged over time, providing a stable and consistent URL structure even if the content is updated. A well-structured permalink is not only user-friendly but also search-engine-friendly, which can positively impact your site’s visibility.

wordpress-permalink-settings

How to Configure Permalinks in WordPress

Step 1: Accessing Permalink Settings

  1. Log in to your WordPress dashboard.
  2. Go to Settings > Permalinks.

Step 2: Choosing a Permalink Structure

WordPress offers several default permalink structures. Here’s a breakdown of each:

  • Plain: https://example.com/?p=123
  • Day and name: https://example.com/2024/07/11/sample-post/
  • Month and name: https://example.com/2024/07/sample-post/
  • Numeric: https://example.com/archives/123
  • Post name: https://example.com/sample-post/
  • Custom Structure: Create a personalized structure using available tags.

Recommended Permalink Structure

For most sites, the Post name option is the best choice. It keeps URLs short, descriptive, and easy to remember. For example:

Good: https://example.com/sample-post/
Bad: https://example.com/2024/07/11/sample-post/

Step 3: Setting a Custom Permalink Structure

If your website requires a unique URL format, you can create a custom structure using the following tags:

  • %year%: Year of the post, four digits (e.g., 2024).
  • %monthnum%: Month of the year (e.g., 07).
  • %day%: Day of the month (e.g., 11).
  • %hour%: Hour of the day (e.g., 15).
  • %minute%: Minute of the hour (e.g., 43).
  • %second%: Second of the minute (e.g., 33).
  • %post_id%: Unique ID of the post (e.g., 123).
  • %postname%: Post slug (e.g., sample-post).
  • %category%: Category slug.
  • %author%: Author name.

For example, you might use: /blog/%year%/%monthnum%/%postname%/

Step 4: Save Changes

After selecting or customizing your permalink structure, scroll down and click Save Changes. WordPress will automatically update your .htaccess file with the new settings.

Optional Permalink Settings

WordPress also provides optional settings to further customize your URLs:

  • Category Base: This option allows you to change the base of your category URLs. For instance, if your default category URL is https://example.com/category-name/, adding a base like “books” would change it to https://example.com/books/category-name/.
  • Tag Base: Similar to the category base, this option lets you customize the URL structure for your tags.

Want to be a Software Developer or a Working Professional looking to enhance your Software Development Skills? Then, master the concepts of Full-Stack Development. Our Full Stack Development – React and Node.js Course will help you achieve this quickly. Learn everything from Front-End to Back-End Development with hands-on Projects and real-world examples. This course enables you to build scalable, efficient, dynamic web applications that stand out. Ready to become an expert in Full-Stack? Enroll Now and Start Creating the Future!

Next Article

WordPress Plugin Setting

author

News

Similar Reads

Article Tags :

three90RightbarBannerImg

Corporate & Communications Address:- A-143, 9th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305) | Registered Address:- K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305

GFG App on Play Store
GFG App on App Store

@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy

Lightbox
Scroll to Top