54 total views, 4 views today

WordPress, setting has an option called ‘Permalink‘. What it can do is

  1. It replaces all the ugly URL’s into nicer one
  2. User can format their URL structure

If you are customizing your URL, make sure the URL ends with either %postname% or %post_id% so that each permalink points to an individual post.

The permalink option may not available for you if your site is deployed in wordpress.com.
This option available if your site is deployed it in external hosting provider like BlueHost or google cloud.

To set a Custom URL rule for your site, go to your WordPress wp-admin page, then settings and click permalink.

012216_0503_Hottosetcus1 Hot to set custom URL in Wordpress

Below is the permalink settings page

012216_0503_Hottosetcus2 Hot to set custom URL in Wordpress

The following tags are supported

%year%

The year of the post, four digits, for example 2004

 %monthnum%

Month of the year, for example 05

 %day%

Day of the month, for example 28

 %hour%

Hour of the day, for example 15

 %minute%

Minute of the hour, for example 43

 %second%

Second of the minute, for example 33

 %post_id%

The unique ID # of the post, for example 423

 %postname%

A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So “This Is A Great Post!” becomes this-is-a-great-post in the URI.

 %category%

A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.

 %author%

A sanitized version of the author name.

Examples

  1. http://<YOUR_HOST>/%day%/%year%/%postname%
  2. http://<YOUR_HOST>/%category%/%postname%
  3. http://<YOUR_HOST>/%category%/%post_id%
  4. http://<YOUR_HOST>/%author%/%postname%
govindan Hot to set custom URL in Wordpress
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
govindan Hot to set custom URL in Wordpress
Connect me
By | 2016-08-28T17:27:24+00:00 January 22nd, 2016|Categories: Blog|Tags: , , |0 Comments
Like us on Facebook.
Connect!