{"id":655,"date":"2017-02-11T10:03:54","date_gmt":"2017-02-11T10:03:54","guid":{"rendered":"https:\/\/example.com\/wordpress\/?p=655"},"modified":"2017-02-11T10:03:54","modified_gmt":"2017-02-11T10:03:54","slug":"how-to-set-the-php-version-per-folder","status":"publish","type":"post","link":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/","title":{"rendered":"How to Set the PHP Version per Folder?"},"content":{"rendered":"<p><span style=\"font-size: medium;\">Do you have a single domain or wish to use different PHP versions per folder? Do you have an installed PHP 5.x software in a folder\/blog and want to use a PHP 7.x instead? If so, you can do this using cPanel and the .htaccess file.<\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>1.<\/strong> Log into your cPanel account.<\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>2.<\/strong> In the <strong>Software<\/strong> section, click on the <strong>MultiPHP Manager<\/strong> icon.<\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/img\/cpanel-multiphp-icon.gif\" \/><\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>3. <\/strong>Assume that we are new to this, and the first thing we will need to do is to get the code generated by cPanel.<\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>4.<\/strong> Scroll down to the end of the page, select your domain from the left side, and see the <strong>PHP Version<\/strong> option. With a drop-down list on the right side. Select the appropriate PHP version from the drop-down menu and click the Apply button.<\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/img\/cpanel-multiphp-select-domain-full.gif\" \/><\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>5. <\/strong>Now open the \/public_html\/.htaccess file in the cPanel File Manager or in your FTP client, and you will find the code generated by cPanel. <\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/img\/cpanel-multiphp-version-generated.gif\" \/><\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>6. <\/strong>After you copy the code, you will wish to set the PHP version to version 7 in the folder\/forum, which means you will need to create a .htaccess file in the folder \/forum\/ and paste the code generated in the previous step in it.<\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>7.<\/strong> Congratulations, now your folder\/forum uses PHP 7, and if you wish to set any other folder to use the same version of PHP as well, you will only need to copy the code from the .htaccess file and paste it into that folder. <\/span><\/p>\n<p><span style=\"font-size: medium;\">Reset your PHP version from your main domain. If you wish to use a different PHP version on any folder, you will need to follow steps 5 and 6, generate the code, copy that code from \/public_html\/.htaccess and paste it into any folder where you wish to set your selected PHP version.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you have a single domain or wish to use different PHP versions per folder? Do you have an installed PHP 5.x software in a folder\/blog and want to use a PHP 7.x instead? If so, you can do this using cPanel and the .htaccess file. 1. Log into your cPanel account. 2. In the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-655","post","type-post","status-publish","format-standard","hentry","category-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Set the PHP Version per Folder? - Reselhost<\/title>\n<meta name=\"description\" content=\"How to Set the PHP Version per Folder? Reseller Hosting 50% OFF Unlimited cPanel Accounts Free SSL \u00a32.69\/month\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set the PHP Version per Folder? - Reselhost\" \/>\n<meta property=\"og:description\" content=\"How to Set the PHP Version per Folder? Reseller Hosting 50% OFF Unlimited cPanel Accounts Free SSL \u00a32.69\/month\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/\" \/>\n<meta property=\"og:site_name\" content=\"Reselhost\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/reselhost\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-11T10:03:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.reselhost.uk\/kb\/wp-content\/uploads\/2021\/08\/face-anuncio.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"648\" \/>\n\t<meta property=\"og:image:height\" content=\"441\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"intelhost\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@reselhost\" \/>\n<meta name=\"twitter:site\" content=\"@reselhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"intelhost\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/\"},\"author\":{\"name\":\"intelhost\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#\/schema\/person\/cc9804f5a4bd9b28316dd9188422dd8e\"},\"headline\":\"How to Set the PHP Version per Folder?\",\"datePublished\":\"2017-02-11T10:03:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/\"},\"wordCount\":302,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#organization\"},\"articleSection\":[\"cPanel - Control Panel\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/\",\"url\":\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/\",\"name\":\"How to Set the PHP Version per Folder? - Reselhost\",\"isPartOf\":{\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#website\"},\"datePublished\":\"2017-02-11T10:03:54+00:00\",\"description\":\"How to Set the PHP Version per Folder? Reseller Hosting 50% OFF Unlimited cPanel Accounts Free SSL \u00a32.69\/month\",\"breadcrumb\":{\"@id\":\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.reselhost.uk\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set the PHP Version per Folder?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#website\",\"url\":\"https:\/\/www.reselhost.uk\/kb\/\",\"name\":\"Reselhost\",\"description\":\"Knowledge Base Web Hosting Reseller Hosting\",\"publisher\":{\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.reselhost.uk\/kb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#organization\",\"name\":\"Reselhost LLC\",\"url\":\"https:\/\/www.reselhost.uk\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.reselhost.uk\/kb\/wp-content\/uploads\/2023\/06\/logo-grande-ok.jpg\",\"contentUrl\":\"https:\/\/www.reselhost.uk\/kb\/wp-content\/uploads\/2023\/06\/logo-grande-ok.jpg\",\"width\":500,\"height\":500,\"caption\":\"Reselhost LLC\"},\"image\":{\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/reselhost\",\"https:\/\/x.com\/reselhost\",\"https:\/\/www.instagram.com\/reselhost\",\"https:\/\/www.linkedin.com\/in\/reselhost\",\"https:\/\/www.youtube.com\/@reselhost\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#\/schema\/person\/cc9804f5a4bd9b28316dd9188422dd8e\",\"name\":\"intelhost\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.reselhost.uk\/kb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g\",\"caption\":\"intelhost\"},\"sameAs\":[\"https:\/\/www.intelhost.net\/kb\"],\"url\":\"https:\/\/www.reselhost.uk\/kb\/author\/intelhost\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set the PHP Version per Folder? - Reselhost","description":"How to Set the PHP Version per Folder? Reseller Hosting 50% OFF Unlimited cPanel Accounts Free SSL \u00a32.69\/month","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:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/","og_locale":"en_GB","og_type":"article","og_title":"How to Set the PHP Version per Folder? - Reselhost","og_description":"How to Set the PHP Version per Folder? Reseller Hosting 50% OFF Unlimited cPanel Accounts Free SSL \u00a32.69\/month","og_url":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/","og_site_name":"Reselhost","article_publisher":"https:\/\/www.facebook.com\/reselhost","article_published_time":"2017-02-11T10:03:54+00:00","og_image":[{"width":648,"height":441,"url":"https:\/\/www.reselhost.uk\/kb\/wp-content\/uploads\/2021\/08\/face-anuncio.jpg","type":"image\/jpeg"}],"author":"intelhost","twitter_card":"summary_large_image","twitter_creator":"@reselhost","twitter_site":"@reselhost","twitter_misc":{"Written by":"intelhost","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#article","isPartOf":{"@id":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/"},"author":{"name":"intelhost","@id":"https:\/\/www.reselhost.uk\/kb\/#\/schema\/person\/cc9804f5a4bd9b28316dd9188422dd8e"},"headline":"How to Set the PHP Version per Folder?","datePublished":"2017-02-11T10:03:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/"},"wordCount":302,"commentCount":0,"publisher":{"@id":"https:\/\/www.reselhost.uk\/kb\/#organization"},"articleSection":["cPanel - Control Panel"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/","url":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/","name":"How to Set the PHP Version per Folder? - Reselhost","isPartOf":{"@id":"https:\/\/www.reselhost.uk\/kb\/#website"},"datePublished":"2017-02-11T10:03:54+00:00","description":"How to Set the PHP Version per Folder? Reseller Hosting 50% OFF Unlimited cPanel Accounts Free SSL \u00a32.69\/month","breadcrumb":{"@id":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.reselhost.uk\/kb\/how-to-set-the-php-version-per-folder\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.reselhost.uk\/kb\/"},{"@type":"ListItem","position":2,"name":"How to Set the PHP Version per Folder?"}]},{"@type":"WebSite","@id":"https:\/\/www.reselhost.uk\/kb\/#website","url":"https:\/\/www.reselhost.uk\/kb\/","name":"Reselhost","description":"Knowledge Base Web Hosting Reseller Hosting","publisher":{"@id":"https:\/\/www.reselhost.uk\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.reselhost.uk\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.reselhost.uk\/kb\/#organization","name":"Reselhost LLC","url":"https:\/\/www.reselhost.uk\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.reselhost.uk\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.reselhost.uk\/kb\/wp-content\/uploads\/2023\/06\/logo-grande-ok.jpg","contentUrl":"https:\/\/www.reselhost.uk\/kb\/wp-content\/uploads\/2023\/06\/logo-grande-ok.jpg","width":500,"height":500,"caption":"Reselhost LLC"},"image":{"@id":"https:\/\/www.reselhost.uk\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/reselhost","https:\/\/x.com\/reselhost","https:\/\/www.instagram.com\/reselhost","https:\/\/www.linkedin.com\/in\/reselhost","https:\/\/www.youtube.com\/@reselhost"]},{"@type":"Person","@id":"https:\/\/www.reselhost.uk\/kb\/#\/schema\/person\/cc9804f5a4bd9b28316dd9188422dd8e","name":"intelhost","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.reselhost.uk\/kb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g","caption":"intelhost"},"sameAs":["https:\/\/www.intelhost.net\/kb"],"url":"https:\/\/www.reselhost.uk\/kb\/author\/intelhost\/"}]}},"_links":{"self":[{"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/posts\/655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/comments?post=655"}],"version-history":[{"count":0,"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/posts\/655\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/media?parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/categories?post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reselhost.uk\/kb\/wp-json\/wp\/v2\/tags?post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}