{"id":4412,"date":"2021-10-24T16:11:41","date_gmt":"2021-10-24T10:41:41","guid":{"rendered":"https:\/\/hostathash.com\/blog\/?p=4412"},"modified":"2021-10-24T16:11:41","modified_gmt":"2021-10-24T10:41:41","slug":"default-wordpress-htaccess-code-updated","status":"publish","type":"post","link":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/","title":{"rendered":"Default WordPress htaccess code [Updated]"},"content":{"rendered":"<p>You may be in a situation where you have issues with your WordPress website such as &#8216;Internal server error&#8217; or maybe permalinks are not working or any other code might have messed up your htaccess file and you might have tried everything but couldn&#8217;t fix it.<br \/>\nNow you are trying to reset the WordPress .htaccess code with the default WordPress .htaccess code which is the last resort to fix the error in your website and you are on the right page to find the default .htaccess code of WordPress.<\/p>\n<h3>What is .htaccess file?<\/h3>\n<p>.htaccess is a configuration file used in web servers such as Apache and LiteSpeed to make your application of website properly depending upon what you are trying to achieve.<br \/>\nAn improper htaccess code can break your website instantly and it is the thing you should avoid messing up.<br \/>\nIt is also used for browser cache configuration and it is an important file even in cPanel\/WHM when using multi-php version on your cPanel account.<\/p>\n<h3>What is the use of .htaccess file in WordPress?<\/h3>\n<p>WordPress is a CMS and it has many things pre-configured however links such as permalink of pages and posts are configured using .htaccess file.<br \/>\nA broken .htaccess code can take your website post and pages down and you may only be able to browse the homepage of the website.<br \/>\nIt will also break images that are very important in your website and make your website look broken.<br \/>\nIt will also affect your rankings as Google and other search engines will consider your website down which will eventually decrease your website rankings.<\/p>\n<h3>What is the location of .htaccess file in WordPress?<\/h3>\n<p>The default location of .htaccess file is inside public_html and\/or in the main folder of your website files.<br \/>\nIf you are not able to find the .htaccess file, it might be hidden(if using cPanel) or it may not be present.<br \/>\nYou should make hidden files visible if you are using cPanel by going in <strong>File manager<\/strong> &gt; <strong>Settings(top right)<\/strong> &gt; <strong>check box<\/strong> of &#8216;<strong>Show hidden files<\/strong>\u00a0and <strong>Save<\/strong> it.<\/p>\n<p><strong>Default WordPress htaccess code<\/strong><\/p>\n<p>Below is the default .htaccess code for WordPress which you can copy-paste in your .htaccess file. Easily replace your htaccess code<\/p>\n<blockquote><p># BEGIN WordPress<\/p>\n<p>RewriteEngine On<br \/>\nRewriteRule .* &#8211; [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\nRewriteBase \/<br \/>\nRewriteRule ^index\\.php$ &#8211; [L]\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule . \/index.php [L]\n<p># END WordPress<\/p><\/blockquote>\n<p>You can find more .htaccess files from the official website if the above code did not work for you:<br \/>\n<a href=\"https:\/\/wordpress.org\/support\/article\/htaccess\/\">https:\/\/wordpress.org\/support\/article\/htaccess\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>If you are facing issues even after resetting htaccess code, comment below and we&#8217;ll try to find a solution for you<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may be in a situation where you have issues with your WordPress website such as &#8216;Internal server error&#8217; or &#8230; <a title=\"Default WordPress htaccess code [Updated]\" class=\"read-more\" href=\"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":4413,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[510,483],"tags":[],"class_list":["post-4412","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-error","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Default WordPress htaccess code [Updated] - HostatHash<\/title>\n<meta name=\"description\" content=\"Below is the default .htaccess code for WordPress which you can copy-paste in your .htaccess file. Easily replace your htaccess code\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Default WordPress htaccess code [Updated] - HostatHash\" \/>\n<meta property=\"og:description\" content=\"Below is the default .htaccess code for WordPress which you can copy-paste in your .htaccess file. Easily replace your htaccess code\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/\" \/>\n<meta property=\"og:site_name\" content=\"HostatHash\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hostathash\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-24T10:41:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostathash.com\/blog\/wp-content\/uploads\/2021\/10\/wordpress-default-htaccess.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sufiyan Shaikh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hostathash\" \/>\n<meta name=\"twitter:site\" content=\"@hostathash\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sufiyan Shaikh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/\"},\"author\":{\"name\":\"Sufiyan Shaikh\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#\\\/schema\\\/person\\\/16f0e6dd4cf0429469e00835dfe7a8b7\"},\"headline\":\"Default WordPress htaccess code [Updated]\",\"datePublished\":\"2021-10-24T10:41:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/\"},\"wordCount\":459,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/wordpress-default-htaccess.png\",\"articleSection\":[\"Error\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/\",\"url\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/\",\"name\":\"Default WordPress htaccess code [Updated] - HostatHash\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/wordpress-default-htaccess.png\",\"datePublished\":\"2021-10-24T10:41:41+00:00\",\"description\":\"Below is the default .htaccess code for WordPress which you can copy-paste in your .htaccess file. Easily replace your htaccess code\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/wordpress-default-htaccess.png\",\"contentUrl\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/wordpress-default-htaccess.png\",\"width\":1280,\"height\":720,\"caption\":\"wordpress default htaccess\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/default-wordpress-htaccess-code-updated\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Default WordPress htaccess code [Updated]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/\",\"name\":\"HostatHash\",\"description\":\"Web hosting solution\",\"publisher\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#organization\",\"name\":\"HostatHash\",\"url\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"HostatHash\"},\"image\":{\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hostathash\",\"https:\\\/\\\/x.com\\\/hostathash\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/#\\\/schema\\\/person\\\/16f0e6dd4cf0429469e00835dfe7a8b7\",\"name\":\"Sufiyan Shaikh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c8994d6a93d0d01ace382e7baa6c864c72dd6d40b4b4843a407a535c2b2373c?s=96&d=wp_user_avatar&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c8994d6a93d0d01ace382e7baa6c864c72dd6d40b4b4843a407a535c2b2373c?s=96&d=wp_user_avatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c8994d6a93d0d01ace382e7baa6c864c72dd6d40b4b4843a407a535c2b2373c?s=96&d=wp_user_avatar&r=g\",\"caption\":\"Sufiyan Shaikh\"},\"url\":\"https:\\\/\\\/hostathash.com\\\/blog\\\/author\\\/hostathash\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Default WordPress htaccess code [Updated] - HostatHash","description":"Below is the default .htaccess code for WordPress which you can copy-paste in your .htaccess file. Easily replace your htaccess code","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/","og_locale":"en_US","og_type":"article","og_title":"Default WordPress htaccess code [Updated] - HostatHash","og_description":"Below is the default .htaccess code for WordPress which you can copy-paste in your .htaccess file. Easily replace your htaccess code","og_url":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/","og_site_name":"HostatHash","article_publisher":"https:\/\/www.facebook.com\/hostathash","article_published_time":"2021-10-24T10:41:41+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/hostathash.com\/blog\/wp-content\/uploads\/2021\/10\/wordpress-default-htaccess.png","type":"image\/png"}],"author":"Sufiyan Shaikh","twitter_card":"summary_large_image","twitter_creator":"@hostathash","twitter_site":"@hostathash","twitter_misc":{"Written by":"Sufiyan Shaikh","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#article","isPartOf":{"@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/"},"author":{"name":"Sufiyan Shaikh","@id":"https:\/\/hostathash.com\/blog\/#\/schema\/person\/16f0e6dd4cf0429469e00835dfe7a8b7"},"headline":"Default WordPress htaccess code [Updated]","datePublished":"2021-10-24T10:41:41+00:00","mainEntityOfPage":{"@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/"},"wordCount":459,"commentCount":0,"publisher":{"@id":"https:\/\/hostathash.com\/blog\/#organization"},"image":{"@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#primaryimage"},"thumbnailUrl":"https:\/\/hostathash.com\/blog\/wp-content\/uploads\/2021\/10\/wordpress-default-htaccess.png","articleSection":["Error","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/","url":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/","name":"Default WordPress htaccess code [Updated] - HostatHash","isPartOf":{"@id":"https:\/\/hostathash.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#primaryimage"},"image":{"@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#primaryimage"},"thumbnailUrl":"https:\/\/hostathash.com\/blog\/wp-content\/uploads\/2021\/10\/wordpress-default-htaccess.png","datePublished":"2021-10-24T10:41:41+00:00","description":"Below is the default .htaccess code for WordPress which you can copy-paste in your .htaccess file. Easily replace your htaccess code","breadcrumb":{"@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#primaryimage","url":"https:\/\/hostathash.com\/blog\/wp-content\/uploads\/2021\/10\/wordpress-default-htaccess.png","contentUrl":"https:\/\/hostathash.com\/blog\/wp-content\/uploads\/2021\/10\/wordpress-default-htaccess.png","width":1280,"height":720,"caption":"wordpress default htaccess"},{"@type":"BreadcrumbList","@id":"https:\/\/hostathash.com\/blog\/default-wordpress-htaccess-code-updated\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostathash.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Default WordPress htaccess code [Updated]"}]},{"@type":"WebSite","@id":"https:\/\/hostathash.com\/blog\/#website","url":"https:\/\/hostathash.com\/blog\/","name":"HostatHash","description":"Web hosting solution","publisher":{"@id":"https:\/\/hostathash.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostathash.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostathash.com\/blog\/#organization","name":"HostatHash","url":"https:\/\/hostathash.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostathash.com\/blog\/#\/schema\/logo\/image\/","url":"","contentUrl":"","caption":"HostatHash"},"image":{"@id":"https:\/\/hostathash.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hostathash","https:\/\/x.com\/hostathash"]},{"@type":"Person","@id":"https:\/\/hostathash.com\/blog\/#\/schema\/person\/16f0e6dd4cf0429469e00835dfe7a8b7","name":"Sufiyan Shaikh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2c8994d6a93d0d01ace382e7baa6c864c72dd6d40b4b4843a407a535c2b2373c?s=96&d=wp_user_avatar&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2c8994d6a93d0d01ace382e7baa6c864c72dd6d40b4b4843a407a535c2b2373c?s=96&d=wp_user_avatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2c8994d6a93d0d01ace382e7baa6c864c72dd6d40b4b4843a407a535c2b2373c?s=96&d=wp_user_avatar&r=g","caption":"Sufiyan Shaikh"},"url":"https:\/\/hostathash.com\/blog\/author\/hostathash\/"}]}},"_links":{"self":[{"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/posts\/4412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/comments?post=4412"}],"version-history":[{"count":1,"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/posts\/4412\/revisions"}],"predecessor-version":[{"id":4414,"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/posts\/4412\/revisions\/4414"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/media\/4413"}],"wp:attachment":[{"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/media?parent=4412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/categories?post=4412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostathash.com\/blog\/wp-json\/wp\/v2\/tags?post=4412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}