{"id":13921,"date":"2024-09-05T09:13:28","date_gmt":"2024-09-05T09:13:28","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=13921"},"modified":"2024-09-26T10:35:09","modified_gmt":"2024-09-26T10:35:09","password":"","slug":"how-to-resolve-error-403-on-cpanel","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/","title":{"rendered":"How to resolve error 403 on cPanel"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Possible cause 1: Server Security &#8211; Mod Security.<\/h1>\n\n\n\n<p>When making changes\/updates\/installation and publishing, you can disable mod security and once done turn it back on.<\/p>\n\n\n\n<p>You do this on the cpanel as per the guide below.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-embed wp-block-embed-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"Qfaqh5Ahx5\"><a href=\"https:\/\/www.truehost.com\/support\/knowledge-base\/turn-mod-security-off\/\">How to turn Mod Security On\/Off<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How to turn Mod Security On\/Off&#8221; &#8212; \" src=\"https:\/\/www.truehost.com\/support\/knowledge-base\/turn-mod-security-off\/embed\/#?secret=RMdozqucId#?secret=Qfaqh5Ahx5\" data-secret=\"Qfaqh5Ahx5\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Possible Cause 2: Corrupt .htaccess file<\/h1>\n\n\n\n<p>Also, check that your .htaccess file is not corrupted or there are no deny rules.<\/p>\n\n\n\n<p>What to check for are deny rules.<\/p>\n\n\n\n<h1 class=\"wp-block-heading has-medium-font-size\">Deny access to .htaccess &#8211; This denies access to all .htacess files<\/h1>\n\n\n\n<p><code>Order allow,deny Deny from all<\/code><\/p>\n\n\n\n<h1 class=\"wp-block-heading has-medium-font-size\">The following code prevents anyone from viewing your website. Visitors will instead see a 403 when viewing your website.<\/h1>\n\n\n\n<p><code>Order deny,allow<\/code><br>Deny from all<\/p>\n\n\n\n<p><code>Require all denied<\/code><\/p>\n\n\n\n<h1 class=\"wp-block-heading has-medium-font-size\">Denying access to specific file extensions<\/h1>\n\n\n\n<p>The following code forces any file ending in .php to throw a 403 Forbidden error when visited:<\/p>\n\n\n\n<p>Apache 2.2<br><code>Order Allow,Deny Deny from All<\/code><br>Apache 2.4<br><code>Require all denied<\/code><\/p>\n\n\n\n<p>Resolution.<br>Remove all those rules.<br>If you suspect there are multiple .htaccess file that you may not be aware of, you can access<br>your cpanel terminal and delete all of them at once using the command below.<\/p>\n\n\n\n<p><code>find . -type f -name \".htaccess\" -exec rm -fv {} \\;<\/code><\/p>\n\n\n\n<p>Then only legitimate .htaccess file will be created.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Possible Cause 3: Wrong PHP version<\/h1>\n\n\n\n<p>And if seeing the error on accessing the site, check that you are using the correct PHP version.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Ensure you&#8217;re using the correct version for your site.<\/li>\n\n\n\n<li>Specifically to Truehost, since we do not use ALT-PHP versions, this may cause 403 if you use it.<br>Ensure the version is EA-PHP and not ALT-PHP.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-embed wp-block-embed-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"eYnqP3YazN\"><a href=\"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-change-php-version-in-the-cpanel\/\">How To Change PHP Version in the Cpanel.<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How To Change PHP Version in the Cpanel.&#8221; &#8212; \" src=\"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-change-php-version-in-the-cpanel\/embed\/#?secret=1pRHO5Kp62#?secret=eYnqP3YazN\" data-secret=\"eYnqP3YazN\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Possible Cause 4: Plugins.<\/h1>\n\n\n\n<p>Some wordpress plugins can block access to legitimate section of your site such as the admin dashboard.<br>Ensure to disable this plugins and check you can access your site.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Possible Cause 5: Files\/Folder&#8217;s permissions.<\/h1>\n\n\n\n<p>Ensure to set your files and folder permissions correctly.<br>Folders should use 755 and files should use 644.<\/p>\n\n\n\n<p>All Done.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>You may also watch the video below to assist on the issue. <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to Solve 403 Forbidden Error in cPanel\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/MaVfJTywU9E?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions. Possible cause 1: Server Security &#8211; Mod Security. When making changes\/updates\/installation and publishing, you can disable mod security and once done turn it back on. You do this on the cpanel as per the [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1822],"doc_tag":[],"class_list":["post-13921","docs","type-docs","status-publish","hentry","doc_category-cpanel"],"year_month":"2026-06","word_count":356,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Kibera","author_nicename":"dan-k","author_url":"https:\/\/truehost.com\/support\/author\/dan-k\/"},"doc_category_info":[{"term_name":"Cpanel","term_url":"https:\/\/truehost.com\/support\/docs-category\/cpanel\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to resolve error 403 on cPanel -<\/title>\n<meta name=\"description\" content=\"The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to resolve error 403 on cPanel -\" \/>\n<meta property=\"og:description\" content=\"The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-26T10:35:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-resolve-error-403-on-cpanel\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-resolve-error-403-on-cpanel\\\/\",\"name\":\"How to resolve error 403 on cPanel -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"datePublished\":\"2024-09-05T09:13:28+00:00\",\"dateModified\":\"2024-09-26T10:35:09+00:00\",\"description\":\"The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-resolve-error-403-on-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-resolve-error-403-on-cpanel\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-resolve-error-403-on-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to resolve error 403 on cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to resolve error 403 on cPanel -","description":"The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions...","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:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to resolve error 403 on cPanel -","og_description":"The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions...","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/","article_modified_time":"2024-09-26T10:35:09+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/","name":"How to resolve error 403 on cPanel -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"datePublished":"2024-09-05T09:13:28+00:00","dateModified":"2024-09-26T10:35:09+00:00","description":"The error 403 above is mostly due to file permissions, wrong PHP version, plugins or server security settings or wrong permissions...","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-resolve-error-403-on-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to resolve error 403 on cPanel"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/13921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=13921"}],"version-history":[{"count":3,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/13921\/revisions"}],"predecessor-version":[{"id":14085,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/13921\/revisions\/14085"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=13921"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=13921"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=13921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}