Home Blog WordPress Management How to change and customize Permalinks in WordPress

How to change and customize Permalinks in WordPress

How to change and customize Permalinks in WordPress

Changing and customizing the WordPress permalink structure is not something you do every day. While it’s an easy enough procedure, it requires a healthy amount of planning. 

Changing the URL structure without proper planning can lead to 404 errors, which will negatively affect visitor experience and SEO. However, when done right, the opposite is true. A good permalink structure can improve your search engine rankings, brand consistency, and UX.

In this article, we will look at how to change and customize the default permalink structure in WordPress, what to consider before and after making changes, as well as what options are available to you.

Everything in WordPress is a post, and all posts have a permalink. This makes permalinks a pretty important aspect of WordPress. Permalinks allow us to navigate WordPress by offering permanent links to posts.

Geek note: WordPress pages are technically posts that use the ‘Page’ Post Type.

WordPress permalinks, however, do more than provide navigation. They give rise to the URL structure of your website, helping search engines understand pages, improving the user experience, and making marketing efforts easier (or harder when not done right).

WordPress automatically generates permalinks based on the permalink structure defined in the settings. In doing so, it facilitates the process of publishing posts on your websites.

Changing your WordPress permalink structure should be a rare occurrence. It is a big decision, but there are several reasons why you might want to do so, such as:

Website rebrand

Websites are constantly evolving, and so are the businesses behind them. Rebrands often come as part and parcel of this evolution process. Whether it’s adjusting to changing customer demands, responding to market shifts, or business growth, rebranding can breathe new life into websites that may have started to lag behind.

Rebranding your website can also be an exercise in rethinking or challenging the way things are done, which may include the permalink structure of the website. After all, a brand new website is one of the best times to restructure your permalinks.

SEO improvements

URLs play an important part in SEO (Search Engine Optimization). A permalink structure that follows best practices can improve your performance in the SERPs (Search Engine Results Pages).

Improved user experience

The permalink structure of your WordPress website is one of the factors visitors use to understand what the page is about. This is important as it directly affects the user experience. Permalinks that are badly structured can also erode visitors’ confidence in your website.

A good permalink structure, then, lends itself to better sales funnel optimization – a prerequisite for improving sales and the success of your website.

Before changing permalinks, there are a number of things that you need to consider and do. Set yourself up for long-term success by considering the following when designing your new permalink structure:

  • Make sure that the new permalink structure is right for SEO & user experience.
  • Ensure that the new URL structure allows for future growth
  • Put yourself in your visitors’ shoes, prioritizing ease of navigation

What to do:

Changing WordPress permalinks is not a small change, but doing the following will make the job much easier:

  • Take a backup of your WordPress site using any of the recommended WordPress plugins, or take a manual WordPress backup
  • Make a list of internal links that will need to be updated
  • Make a list of current links for which redirections need to be set up, including links from external sources

Choosing between custom and preset structures

WordPress Permalinks come in a number of preset structures. However, if none of these presets fit within the goals you want to achieve, you can also choose a custom permalink structure instead.

There are no hard rules for permalinks. This will largely depend on your specific website, goals, and requirements.

When opting for custom permalinks, keep the different kinds of posts in mind. Ensure that the custom permalinks you choose are able to accommodate future growth to avoid having to repeat the exercise over and over again.

The easiest way to change permalinks, whether you’re opting for preset or custom permalinks, is through the WordPress admin dashboard.

Navigate to Settings > Permalinks and look for Permalink structure under Common Settings:

WordPress dashboard permalink settings

Choose any of the available structures and then click on Save Changes.

This will automatically update each old URL to the new URL address.

Pro Tip: If you’re using Google Search Console, make sure you submit the new sitemap.xml. Remember to check for broken links and set up redirects where required. While you might not necessarily need to check each and every blog post, do make sure that everything is working to avoid losing search engine rankings.

WordPress posts can include categories and tags to help visitors find similar posts.

For example, the Melapress blog makes use of a number of post categories, including WordPress management, WordPress security, and News & announcements.

WordPress blog categories on Melapress website

Categories and tags can be added in the Editor and show up in the published post:

WordPress blog categories

Visitors can then click on the category name or tag name and be taken to that category/tag page:

WordPress category page

We can customize the permalinks for category and tag by updating the relevant fields in the Optional section:

WordPress Category Tag permalinks
  • Category base: Enter the custom permalink replacing /category/ in category pages
  • Tag base: Enter the custom permalink replacing /tag/ in tag pages

At the start of the article, we explained how everything in WordPress is a post, and all posts have permalinks. This also applies to WooCommerce, which uses the post type ‘Product’ as product pages. As such, we can also change and customize product permalinks, category permalinks, and tag permalinks.

To customize WooCommerce permalinks, navigate to Settings > Permalinks. Here, you’ll find the WooCommerce permalink settings alongside the WordPress permalink settings.

WooCommerce permalink settings are highlighted by the red box in the screenshot below:

WooCommerce permalink options

There are two types of WooCommerce permalinks you can change and customize; taxonomy permalinks and products permalinks.

There are three WooCommerce taxonomy permalinks that can be changed. These work the same way as the WordPress category and tag permalinks:

  • Product category base: Enter the custom permalink replacing the default product category base
  • Product tag base: Enter the custom permalink replacing the default product tag base
  • Product attribute base: Enter the custom permalink replacing the default product attribute base

Permalinks can be customized through the use of tags. Think of tags like building blocks that you can combine in whichever way you want to form a custom permalink structure. WordPress offers a number of permalink tags, including:

  • %year%: The year the post was published in
  • %monthnum%: The number of the month the post was published in
  • %day%: The day the post was published on
  • %hour%: The hour the post was published in
  • %minute%: The minute the post was published in
  • %second%: The second the post was published in
  • %post_id%: The unique ID of the post
  • %postname%: The name of the post with spaces replaced by a dash (-)
  • %category%: The category of the post
  • %author%: The author who published the post

Custom structure can be set in a number of ways including from the WordPress dashboard, from the database directly, or through WP-CLI. We cover the process for each of these in the next section.

In the meantime, let’s take a moment to see how custom structures work.

To create custom permalinks, you’ll need to use the tags listed above.

WordPress custom permalink structure settings

You can see how each tag is precisely replicated in the URL address, as shown in the screenshot below:

Custom WordPress permalink in URL

WordPress dashboard

The easiest and most straightforward way to change permalinks in WordPress is through the admin dashboard. Here, you can easily choose a preset permalink structure or even customize your very own. The graphical user interface makes it easy to visualize how permalinks will look on your WordPress website. As such, you can ensure that you’re happy with the new URL structure.

Log in to your WordPress admin dashboard and navigate to Settings > Permalinks. Here you’ll find the permalink settings of your WordPress website.

Unless you’ve changed your permalink structure in the past, you should find that permalinks are set to the Plain option. This plain permalink structure is WordPress’ default permalink structure. This kind of structure is also known as ugly permalinks.

Preset WordPress permalink options

Available preset options include;

  • Plain: The ID of the post, including the query (?p=)
  • Day and name: The day of the post (year, month, and day) and the name of the post
  • Month and name: The month of the post (year and month) and the name of the post
  • Numeric: The ID of the post
  • Post name: The name of the post with spaces replaced by a dash (-)
  • Custom Structure: A structure of your choosing, using the available tags

Choose the WordPress permalink structure that you would like to use and then click on Save Changes.

phpMyAdmin

You can also change your permalink settings directly from the database. This method can be especially useful if you cannot access the WordPress dashboard for one reason or another.

We will illustrate this method using phpMyAdmin, which offers a user-friendly interface for editing the database.

First, log in to your phpMyAdmin. You should be able to find a link through your hosting provider’s back end. Next, select your WordPress database and then choose the wp_options table.

Find the option_name column and then look for the permalink_structure row. Once you find it, click on Edit.

All we need to do now is type in the permalink structure that we would like to use in the option_value field. Use the same syntax that you would use when defining a custom structure in the WordPress dashboard. Once ready, click on Go to save changes.

WP-CLI

Another way to change permalinks in WordPress is by using WP-CLI

We can start by asking WP-CLI what the current permalink structure looks like. We can do so by running the following command:

wp option get permalink_structure
WP-CLI provides current permalink structure

In the screenshot above, we can see that WP-CLI tells us the current structure is as follows:

/%hour%/%day%/%minute%/%author%/

To specify a new structure, we need to run the following command:

wp option update permalink_structure '/%permalink-structure%/

where %permalink-structure% is the new permalink structure that we would like to configure.

Once that is done, all that’s left to do is to flush the rewrite rules, by running the following command:

wp rewrite flush

The new permalink structure will now take effect.

Plugin

Another option to change and customize permalinks is by using a plugin such as Permalink Manager.

The Lite version of the plugin includes the ability to changes permalinks (called Permastructures in the plugin) for different post types. However, if you want to change permalinks for taxonomies or WooCommerce, you will need to upgrade to the PRO version.

It’s important to note that once you change the permalink structure of your WordPress website, all URLs will change. Now is the time to:

  • Update any internal links that need to be updated
  • Set up any required redirections
  • Reach out to websites with inbound links to update their URLs

You might also want to scan your website for any 404s or redirection errors since these can cause issues for both users and SEO. Seobility’s Website Audit Tool is great for this, as it allows you to uncover 404 errors as well as redirection issues in a user-friendly way.

Permalink issues can have a negative impact on your site, whether you’re using preset or custom permalinks. Search engines might not be able to crawl your site properly. 404 errors can also lead to search engines de-ranking your website.

Before resorting to changing permalinks there are a number of troubleshooting steps to fix WordPress permalink issues you can take, including testing plugins and replacing the htaccess file.

Frequently Asked Questions

How do I change the permalink in a WordPress page?

You can change the permalink of a WordPress page directly through the editor. Look for the page settings page on the right of the editor and then click on URL. Here, you’ll find the permalink settings, which you can freely edit. Remember to click on Update once done for changes to take effect.

If you have Yoast installed, you can also change the permalink from the WordPress Slug option, which you’ll find in the Yoast SEO pane.

How do I change the URL of my WordPress site?

The easiest way to change your website’s permalink structure is through the WordPress dashboard. Log in and navigate to Settings > Permalinks. Here, you’ll find preset options as well as the ability to customize your permalinks.

What happens if I change the permalink in WordPress?

If you change permalinks in WordPress, posts and page URLs will be updated to the new permalink structure. Keep an eye out for broken links and set up redirects where required. You might also want to reach out to administrators of 3rd party websites to update any inbound links to your website

Posted inWordPress Management
Joel Farrugia
Joel Barbara

Joel is our technical writer responsible for writing the different kinds of content we need. With a background in tech and content, he has a passion for making technology accessible and understandable for everyone. You can reach Joel at joel@melapress.com.


Leave a Reply

Your email address will not be published. Required fields are marked *

Stay in the loop

Subscribe to the Melapress newsletter and receive curated WordPress management and security tips and content.

Newsletter icon

It’s free and you can unsubscribe whenever you want. Check our blog for a taste.

Envelope icon

The survey results are in: Find out what your WordPress security gameplan might be missing

Close

The survey results are in: Find out what your WordPress security gameplan might be missing

Uploading Melapress Login Security as a zip file in WordPress
Melapress Login Security in the WordPress plugin repository
Close

Installing Melapress Login Security Free

Congratulations on taking control of your WordPress website's security by implementing robust login and password policies with Melapress Login Security. You can change your login page URL, limit failed login attempts, and reset passwords.

 

Below are two ways to install Melapress Login Security on your website:

Go to your plugin dashboard on your site, then go to "Add New" and then search for Melapress Login Security.

Download the Melapress Login Security plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2

Uploading CAPTCHA 4WP as a zip file in WordPress
CAPTCHA 4WP in the WordPress plugin repository
Close

Installing CAPTCHA 4WP Free

Well done you. You're one step closer to safeguarding your WordPress website from spam and automated attacks with CAPTCHA 4WP. You'll be able to effortlessly integrate CAPTCHA into your forms and enjoy a website with enhanced security.

 

Below are two ways to install CAPTCHA 4WP on your website:

Go to your plugin dashboard on your site, then go to "Add New", and then search for CAPTCHA 4WP.

Download the CAPTCHA 4WP plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2

Uploading WP Activity Log as a zip file in WordPress
WP Activity Log in the WordPress plugin repository
Close

Installing WP Activity Log Free on your website

You deserve a pat on the back for choosing to record user actions and changes on your website. That is the first step towards better user accountability, easier troubleshooting of website security, and many other benefits of issues.

 

Below are the two ways to install WP Activity Log on your website:

Go to your plugin dashboard on your site, then go to "Add New" and then search for WP Activity Log.

Download the WP Activity Log plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2

Uploading WP 2FA as a zip file in WordPress
WP 2FA in the WordPress plugin repository
Close

Installing WP 2FA Free

Congratulations on taking the first step towards enhancing your WordPress site's security with WP 2FA Free! You're now on your way to protecting your valuable data and ensuring peace of mind. No coding or technical knowledge is required.

 

Below are two ways to install WP 2FA on your website:

Go to your plugin dashboard on your site, then go to "Add New", and then search for WP 2FA.

Download the WP 2FA plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2