Permalinks are unquestionably essential for setting the structure your website's content. Unfortunately, WordPress is unable to provide in-depth permalink customisation owing to the limitations imposed by rewrite rules.
As for now, Permalink Manager is one of the most popular and advanced permalinks plugins. So, how can you use it to optimize your WordPress permalinks? This article should provide you some suggestions and help you get started using Permalink Manager.
The first part will describe how the plugin operates. In the rest of the article, you will also learn how to configure and make the most of it.
Understanding Custom Permalinks in WordPress
The whole permalink detection mechanism in WordPress is based on rewrite rules, thus in order to comprehend what custom permalinks are, you must first understand how this built-in system works.
What are Rewrite Rules in WordPress?
In a nutshell, WordPress rewrite rules are predefined permalink patterns. Their purpose is to tell WordPress on how to correctly assign a URL to a specific content item. They help to reduce the number of database requests, improving the performance of your website.
When a visitor attempts to access a page on your website, WordPress compares the requested URL to an array of rewrite rules. These rewrite rules are essentially a set of permalink format patterns that allow WordPress to identify the content being requested. If the requested permalink matches one of these patterns, WordPress will convert the URI into a database query, load the appropriate template file, and deliver the requested page to the visitor.
Let us use an analogy to better understand how rewrite rules work. Assume you are looking for a house and know the exact address. The street address tells visitors how to reach the property, and the house number tells them which building they are searching for.
When WordPress detects a URL, it first verifies the rewrite rule (street name) and then searches the database for a specific content item (house). If someone uses the incorrect permalink pattern (street name), WordPress will be unable to find what content (house) should load.
What are Custom Permalinks?
Because of rewrite rules each content type (posts, pages, custom post types, categories, and taxonomies) must have its own unique permalink format.
This is when custom permalinks come into play. They are intended to allow content to be found without the need to validate that permalink patterns match.
Custom permalinks are simple user-defined URLs that may be adjusted for each of a WordPress website's posts, pages, custom post type items, categories or custom taxonomies. This allows users to customize URLs with relevant keywords or categories to make them more useful and SEO-friendly.
The major benefit of custom permalinks is that they provide users full control over URL structure, unlike WordPress' default permalinks, which are generated automatically.
How Permalink Manager Works?
If you use a plugin like Permalink Manager, you can easily alter your permalink structure to produce URLs that are both meaningful and search engine friendly. The plugin works around the shortcomings of the built-in permalink system by using a sophisticated algorithm to identify the requested URLs.
Custom permalinks in Permalink Manager do not rely on rewrite rules because each permalink is assigned to a certain post or term by its unique ID. They are all saved in the database as a single array of custom permalinks.
When Permalink Manager helps WordPress in finding content, it simply searches this array. If the requested URL matches the custom permalink, the plugin tells WordPress about which content item to load.
Unlike the built-in permalink system that only allows you to edit the fragment of URLs (slugs), this plugin gives you control over editing the entire URL.
Editing Custom Permalinks with Permalink Manager
If you are unhappy with what WordPress provides out of the box, Permalink Manager can help you quickly rewrite your permalinks.
If you wish to manually customize particular permalinks, you can use the custom permalink editor. It is worth mentioning that you may use it not only to modify page permalinks, but also to change the URL addresses of individual posts, categories, custom post types, and taxonomies.
Furthermore, the plugin allows you to change many permalinks at once, which speeds up the URL changing process. You may review and bulk edit permalinks for each of your post types and taxonomies separately, as seen in the screenshot below.
If necessary, you may use Permastructures editor to quickly rearrange the permalinks of all items of any specific content type in any way you want. This allows you to, for example, remove the default "rewrite slug" or add custom fields to WordPress permalinks.
Auto-update custom permalinks
In most cases, you should not automatically update custom permalinks. When permalinks are changed, backlinks referring to the previous URLs may become invalid, potentially resulting in traffic loss.
Consequently, Permalink Manager by default does not automatically update custom permalinks. This prevents potential traffic and social signal loss due to URL changes. You have complete control with this approach, so you can choose when and whether to change your URL addresses.
For the same reason, changing the "Permastructure" settings to rearrange the permalink format will affect only new content items and will have no effect on old ones. This is done on purpose to reduce any potential SEO risks for pages that are already indexed by Google.
Applying a mass change therefore necessitates an additional step for the existing custom permalinks. You must use the "Regnerate/reset" tool in order for the new Permastructure settings to be applied to existing content.
You can choose to exclude specific content types or posts/terms by their IDs from Permalink Manager. For instance, you can use custom permalinks only for WooCommerce permalinks while retaining the original URLs for all other content.
The plugin's "Exclusion settings" section contains the necessary configuration choices for using this feature.
When the Permalink Manager first launched, it was intended to be used for a typical WordPress website with less than 20.000 subpages. Keeping this in mind, all custom permalinks are saved in a single database row. This is to prevent multiple SQL queries to the database from slowing down the pageload.
This approach works for the great majority of WordPress sites. However, it may not be optimal if you are planning on using the plugin to rewrite tens of thousands of permalinks. In this situation, the custom permalinks array may grow enormously. As a result, any activities on it may have an impact on pageload speed.
Please see this article for further information about the plugin's performance.
Most Common Ways to Use Permalink Manager
How to Add Category/Taxonomy to Custom Post Type Permalinks?
Permalink Manager allows you to customize the permalink of your custom post types by using a slug from a taxonomy of your choice. In terms of UX, this structure provides a significant benefit. Creating a hierarchical content structure helps site visitors grasp it.
Using the plugin you may construct a hierarchical structure for your custom post types by adding the category to the URL. This way, when you create a new post and assign a term from the taxonomy to a custom post, the plugin may automatically include the term's slug in the post's permalink.
Custom post type ("car") permalink with related taxonomy ("car-brand") included:
How to Remove Parent Slugs From Hierarchical Permalinks?
The plugin is the easiest method to remove parent URLs from hierarchical permalinks without any PHP skills. Hierarchical post types, such as pages, and taxonomies, such as category, usually contain the parent and child categories/pages in their permalinks:
Hierarchical post type (pages):
Using the Permastructure, you may alter the permalink structure by removing parent slugs from hierarchical permalinks in order to get flatter URLs. The process is straightforward.
To do so, for hierarchical post types, use the "%pagename_flat%" tag for pages and "%custom-post-type-name_flat%" for custom post types.
Hierarchical post type (pages):
For categories, use "%category_flat%" instead of "%category%". Similarly, for other hierarchical taxonomies, use "%custom_taxonomy_name_flat%" in place of "%custom_taxonomy_name%".
Check out the dedicated guide to learn more about how to use this feature.
How to Add Custom Fields to Custom Post Type Permalinks?
Another unique feature of Permalink Manager is a possibility to add the custom fields to the permalinks of custom post types and taxonomies. Thanks to this, you can add the text value of your custom fields directly to the permalinks.
You can include tags like "%__custom-field-name%" in your custom fields. The plugin will automatically replace them with the actual value when you publish a new post or term.
Custom post type ("product") permalink with custom field ("sku") included: