What are permalinks in WordPress? Which structure is the best?
A permalink is the permanent URL of a post, page or archive. You choose the structure in Settings > Permalinks.
Terminal output
$ wp rewrite structure '/%postname%/'
Success: Rewrite structure set.
Success: Rewrite rules flushed.
$ wp eval 'echo get_permalink(1);'
http://example.com/hello-world/
The options are Plain (/?p=123), Day and name, Month and name, Numeric, Post name and Custom. For most sites Post name is best, because the URL is short and readable, and has the keyword.
If new pages show a 404 error after a change or a move, save the permalink settings again to refresh the rewrite rules. More in Permalinks.
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |