This is where you will enable the static route feature for the whole website instead of using the dynamic path structure. Static paths mean that your every post, page, category, tag, … address will be represented by a specific name, not a numeric one.
- Common Settings: Common settings.
- Default: Default path structure (dynamic path).
- Day and name: Structured path with full date post post display and post name.
- Month and name: Structured path with month, year and post display type.
- Numeric: The path structure displays the ID of the post instead of the name.
- Post name: Only show post name on path
- Custom Structure: Customize the path structure arbitrarily, see also the end of the article.
- Optional: Optional settings are not required.
- Category base: The parent path name of the paths to the category page. Default it will be http://domain/category/category-name/, if you enter “wordpress” here it will display http://domain/wordpress/category-name/.
- Tag base: The parent path name of the path to the tag page. By default it will be http://domain/tag/tag-name/, if you enter “the” here it will display as http://domain/the/tag-name.
More about Custom Structure
If you choose this option, you can structure the path the way you like. The structure is defined here through the structured keyword (enclosed by the % character), here are some structured keywords:
- %year% – Post year.
- %monthnum% – Post month.
- %day% – Post date.
- %hour% – Post hour.
- %minute% – Poste minutes.
- %second% – Post second.
- %post_id% – ID number of the post.
- %postname% – The name of the post (retracts to “article-title”).
- %category% – Category name of the post (if you choose 2 categories, it will display 1 in 2 and fixed).
- %author% – the author of the post.
For example, the type of post path is http://domain/category-name/post-name, then I will fill in the Custom Structure is /%category%/%postname%.
Reference for SEO people: The standard permalink structure SEO
Error 404 when setting up a Permalink on localhost
If you have enabled the site’s permalink with a 404 error in localhost then your localhost may not have Apache’s mod_rewrite enabled.
Open the httpd.conf file in the localhost directory (for XAMPP, open the Control Panel of the XAMPP -> Config -> httpd.conf) and find all the settings AllowOverride None change into AllowOverride All. Then Stop Apache and Start Again.
Error 404 when setting permalink on host
If you are using a normal host that has 404 errors when enabling the permalink, then the .htaccess file in your root directory on the host does not have the rewrite path setting.
You go to the host by FTP and open .htaccess file (if not already created) and copy this to:
See also: List of suitable hosts for WordPress.
If you have any problems, leave a comment and I will reply within 24 hours.