How to Set Up Pretty Permalinks in WordPress
Posted: Sun Dec 22, 2024 9:39 am
This is why most WordPress site owners use Pretty Permalinks, which is a term used for SEO friendly URLs in WordPress. These SEO friendly Permalinks contain post, category, tag, title in the URL, which allows you to use keywords within your URLs.
In this article, we will show you how to set up Permalinks in WordPress and make your website more SEO friendly.
To set up Permalinks on your WordPress site, simply go to Settings » Permalinks . There you will see a number of options to choose from:
Permalink settings in WordPress
Choosing a Permalink Structure
Most WordPress SEO experts agree that the best permalink structure is one that uses the post name in the URL. The default options allow you to choose between day and name, month and name, indonesian phone numbers and post name URL structure. There is also an option to have numeric permalinks. Numeric permalinks are better than ugly URLs but are not considered as good as post name URLs.
You need to choose one of the default options by clicking the radio button next to it and save the settings.
Apart from the default options, you can also create your own Permalink structure using special tags. The available tags you can use are:
%year% – Four digit year of publication, for example 2014 .
%monthnum% – Two-digit month of the position, for example 07 .
%day% – Two-digit day of the month, for example 18 .
Hour
%minute%
%second%
%post_id% – The unique ID number of the post example, 123 .
%postname% – The sanitized post title to be used in the post URL, for example, how-to-set-up-permalinks-in-wordpress .
%category% – Sanitized category name for use in URLs. e.g. wordpress-tutorials .
%author% – Author name sanitized for use in the URL. e.g. syed-balkhi .
WordPress allows you to use any structure you want. However, you need to use %postname% and %post_id% for each post. These tags are unique identifiers that help WordPress locate the post in the database. The same goes for your category archives. They must have %category% in them.
We recommend that you review which permalink structure you prefer before you start publishing content. Keep in mind that if you change your permalink structure later, the URLs of your posts and pages will also change. Therefore, if you change your permalink structure in the future, you will need to set up the 301 redirect in your .htaccess file to redirect users to the appropriate content.

Easy to use permalink structure troubleshooting
In rare cases, your server may not have this module enabled. In that case, you will see a notice on the Permalink settings page informing you that WordPress cannot write to the .htaccess file.
Update .htaccess Now
WordPress permalinks require the mod_rewrite module installed on your web server. WordPress also uses a special server configuration file called .htaccess to use pretty permalinks. All of our recommended WordPress hosting providers have configured their servers with the settings required to run WordPress. This means that your server should already be set up to use Apache's mod_rewrite module.
The two most common reasons why permalinks don't work are:
1. Incorrect file permissions
Setting the correct file permissions will stop WordPress from creating or writing to the .htaccess file. To resolve this issue you would need to connect to your website using an FTP client. Make sure your FTP client is set to show hidden files. You will see a .htaccess file in the root directory of your website. If you don’t see it then you need to create one. After that simply copy and paste the rewrite code shown in the Permalinks settings into your .htaccess file and save it.
In this article, we will show you how to set up Permalinks in WordPress and make your website more SEO friendly.
To set up Permalinks on your WordPress site, simply go to Settings » Permalinks . There you will see a number of options to choose from:
Permalink settings in WordPress
Choosing a Permalink Structure
Most WordPress SEO experts agree that the best permalink structure is one that uses the post name in the URL. The default options allow you to choose between day and name, month and name, indonesian phone numbers and post name URL structure. There is also an option to have numeric permalinks. Numeric permalinks are better than ugly URLs but are not considered as good as post name URLs.
You need to choose one of the default options by clicking the radio button next to it and save the settings.
Apart from the default options, you can also create your own Permalink structure using special tags. The available tags you can use are:
%year% – Four digit year of publication, for example 2014 .
%monthnum% – Two-digit month of the position, for example 07 .
%day% – Two-digit day of the month, for example 18 .
Hour
%minute%
%second%
%post_id% – The unique ID number of the post example, 123 .
%postname% – The sanitized post title to be used in the post URL, for example, how-to-set-up-permalinks-in-wordpress .
%category% – Sanitized category name for use in URLs. e.g. wordpress-tutorials .
%author% – Author name sanitized for use in the URL. e.g. syed-balkhi .
WordPress allows you to use any structure you want. However, you need to use %postname% and %post_id% for each post. These tags are unique identifiers that help WordPress locate the post in the database. The same goes for your category archives. They must have %category% in them.
We recommend that you review which permalink structure you prefer before you start publishing content. Keep in mind that if you change your permalink structure later, the URLs of your posts and pages will also change. Therefore, if you change your permalink structure in the future, you will need to set up the 301 redirect in your .htaccess file to redirect users to the appropriate content.

Easy to use permalink structure troubleshooting
In rare cases, your server may not have this module enabled. In that case, you will see a notice on the Permalink settings page informing you that WordPress cannot write to the .htaccess file.
Update .htaccess Now
WordPress permalinks require the mod_rewrite module installed on your web server. WordPress also uses a special server configuration file called .htaccess to use pretty permalinks. All of our recommended WordPress hosting providers have configured their servers with the settings required to run WordPress. This means that your server should already be set up to use Apache's mod_rewrite module.
The two most common reasons why permalinks don't work are:
1. Incorrect file permissions
Setting the correct file permissions will stop WordPress from creating or writing to the .htaccess file. To resolve this issue you would need to connect to your website using an FTP client. Make sure your FTP client is set to show hidden files. You will see a .htaccess file in the root directory of your website. If you don’t see it then you need to create one. After that simply copy and paste the rewrite code shown in the Permalinks settings into your .htaccess file and save it.