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, the rewrite rules are predefined permalink patterns. Their purpose is to tell WordPress on how to correctly assign a URL to a specific content item and reduce the number of database requests.
WordPress makes use of them when visitors access your website, comparing the requested URL to a list of those rewrite rules. If the requested permalink matches one of these patterns (rules), 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 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?
With a plugin like Permalink Manager, you can effortlessly change your permalink structure to create URLs that are both relevant and search engine friendly. The plugin addresses the limitations of the built-in permalink system by using a sophisticated algorithm to recognize 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.
If you are unhappy with what WordPress provides out of the box, Permalink Manager can help you quickly rewrite your permalinks.
Editing Custom Permalinks
Individual Changes
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.
Bulk Changes
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.
Exclusion Settings
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.
Plugin's Performance
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.
You may do this by using the plugin to automatically include the category in the URL whenever you create a new post or assign a taxonomy term to a custom post. Therefore, the plugin could alter the permalink to include the term's slug by default.
Custom post type ("car") permalink with related taxonomy ("car-brand") included:
http://example.com/%car-brand%/%car%http://example.com/europe/northern-europe/volvo/s80-2022
http://example.com/asia/pacific/south-korea/i20-2019
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):
http://example.com/%pagename%http://example.com/americas/
http://example.com/americas/north-america/
http://example.com/americas/north-america/canada/
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):
http://example.com/%pagename_flat%http://example.com/americas/
http://example.com/north-america/
http://example.com/canada/
For categories, use "%category_flat%" instead of "%category%". For other hierarchical taxonomies, substitute "%custom_taxonomy_name_flat%" for "%custom_taxonomy_name%".
How to Make WordPress Permalinks Include Custom Fields?
One really helpful feature of the plugin is the ability to automatically include custom fields in permalinks. As of right now, no other plugin provides this feature. This allows the permalinks of custom taxonomies and post types to have meta data added to them.
Custom post type ("product") permalink with custom field ("sku") included:
http://example.com/%product_cat%/%product%-%__sku%http://example.com/coffee/arabica/yirgachefe-85932643
http://example.com/coffee/robusta/borbone-45667890