{"id":8790,"date":"2015-01-28T19:16:18","date_gmt":"2015-01-28T19:16:18","guid":{"rendered":"https:\/\/wp.okra.host\/article\/adding-pretty-print-urls\/"},"modified":"2021-03-07T14:51:55","modified_gmt":"2021-03-07T13:51:55","slug":"adding-pretty-print-urls","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/adding-pretty-print-urls\/","title":{"rendered":"Adding pretty-print URLs"},"content":{"rendered":"<h2 id=\"overview\" >Overview<\/h2>\n<p>Pretty-print URLs (<em>permalinks<\/em>)\u00a0in WordPress transform meaningless URL patterns, e.g. <em>index.php?page_id=123<\/em> into meaningful\u00a0URLs, like <em>\/wordpress\/adding-pretty-print-urls<\/em>. Navigation is easier to view in the browser, plus it helps with SEO.\u00a0Enabling pretty-print\u00a0is a two-part process, add a few lines to your <a title=\".htaccess Guide\" href=\"https:\/\/kb.okra.host\/guides\/htaccess-guide\/\">.htaccess<\/a>\u00a0and configure the display style\u00a0in WordPress.<\/p>\n<div id=\"attachment_610\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/permalinks-before-after.gif\" rel=\"lightbox-0\"><img decoding=\"async\" aria-describedby=\"caption-attachment-610\" loading=\"lazy\" class=\"size-medium wp-image-610\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/permalinks-before-after-300x49.gif\" alt=\"Permalinks before and after as seen in the browser.\" width=\"300\" height=\"49\" \/><\/a><\/p>\n<p id=\"caption-attachment-610\" class=\"wp-caption-text\">Permalinks before and after as seen in the browser.<\/p>\n<\/div>\n<h2 id=\"solution\" >Solution<\/h2>\n<ol>\n<li>Create a <a title=\".htaccess Guide\" href=\"https:\/\/kb.okra.host\/guides\/htaccess-guide\/\">.htaccess<\/a> file inside the <a title=\"Where is site content served from?\" href=\"https:\/\/kb.okra.host\/web-content\/where-is-site-content-served-from\/\">document root<\/a> for your WordPress site if it does not already exist.<\/li>\n<li>Add the following lines to the <code>.htaccess<\/code> file\n<pre>&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine On\r\nRewriteBase \/\r\nRewriteRule ^index.php$ - [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . \/index.php [L]\r\n&lt;\/IfModule&gt;<\/pre>\n<ul>\n<li><strong>Files<\/strong> &gt; <strong>File Manager<\/strong> works well for performing a quick edit on\u00a0this file<\/li>\n<\/ul>\n<\/li>\n<li>Login to your WordPress admin portal, typically <code>\/wp-admin<\/code>, e.g. http:\/\/example.com\/wp-admin<\/li>\n<li>Visit <strong>Settings<\/strong> &gt; <strong>Permalinks<\/strong> to choose a permalink structure under\u00a0<span style=\"text-decoration: underline\">Common Settings<\/span>\n<ul>\n<li>we use a <strong>custom structure<\/strong> with the value <code><code>\/%category\/%postname%\/<\/code><\/code> since multiple categories could contain the same post title\n<\/p>\n<div id=\"attachment_587\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/permalink-value-apis.png\" rel=\"lightbox-1\" data-lbwps-width=\"858\" data-lbwps-height=\"169\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/permalink-value-apis.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-587\" loading=\"lazy\" class=\"size-medium wp-image-587\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/permalink-value-apis-300x59.png\" alt=\"Custom permalink used on kb.okra.host.\" width=\"300\" height=\"59\" \/><\/a><\/p>\n<p id=\"caption-attachment-587\" class=\"wp-caption-text\">Custom permalink used on kb.okra.host.<\/p>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>Click\u00a0<strong>Save Changes<\/strong><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2 id=\"see-also\" >See\u00a0also<\/h2>\n<ul>\n<li>WordPress Codex: <a href=\"http:\/\/codex.wordpress.org\/Using_Permalinks\">Using Permalinks<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview Pretty-print URLs (permalinks)\u00a0in WordPress transform meaningless URL patterns, e.g. index.php?page_id=123 into meaningful\u00a0URLs, like \/wordpress\/adding-pretty-print-urls. Navigation is easier to view in the browser, plus it helps with SEO.\u00a0Enabling pretty-print\u00a0is a two-part process, add a few lines to your .htaccess\u00a0and configure the display style\u00a0in WordPress. Permalinks before and after as seen&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[69],"ht-kb-tag":[],"class_list":["post-8790","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-wordpress"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8790"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8790\/revisions"}],"predecessor-version":[{"id":8791,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8790\/revisions\/8791"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8790"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8790"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}