{"id":1775,"date":"2021-05-06T16:43:50","date_gmt":"2021-05-06T16:43:50","guid":{"rendered":"https:\/\/www.rochen.com\/docs\/?post_type=ht_kb&#038;p=1775"},"modified":"2023-04-25T00:27:22","modified_gmt":"2023-04-25T00:27:22","slug":"incorrect-php-version-wordpress","status":"publish","type":"ht_kb","link":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/","title":{"rendered":"Incorrect PHP Version in WordPress"},"content":{"rendered":"\n<p>In some cases, after <a href=\"https:\/\/www.rochen.com\/docs\/documentation\/changing-your-cpanel-php-version\/\">changing your PHP version<\/a> from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version (one you did not set.)<\/p>\n    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle  \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Important note<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tAny users on a CloudLinux server (such as any of our shared servers) should always use the \u2018Select PHP Version\u2019 page in cPanel to modify their PHP version    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<p>A solution is to modify your <a href=\"http:\/\/javascriptkit.com\/howto\/htaccess.shtml\">.htaccess file<\/a> to remove the incorrect hard-coded PHP version.<\/p>\n<p>You can do this by following the instructions below after logging in\u00a0to your cPanel account. If you&#8217;re unsure how to access your cPanel account, <a href=\"https:\/\/www.rochen.com\/docs\/documentation\/logging-in-to-cpanel-whm-or-webmail\/\">click here.<\/a><\/p>\n<ol>\n<li>In cPanel, click the <strong>File Manager<\/strong> icon. <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2033\" src=\"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700.jpg\" alt=\"File manager icon in cPanel\" width=\"611\" height=\"255\" srcset=\"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700.jpg 611w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700-300x125.jpg 300w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700-50x21.jpg 50w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700-60x25.jpg 60w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700-100x42.jpg 100w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/> \u00a0<\/li>\n<li>In the file manager, select <strong>Settings<\/strong> in the top right corner of the page. When the pop-up appears, check the box that says <strong>Show hidden files<\/strong>. <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2035\" src=\"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105356-0700.jpg\" alt=\"Settings in cPanel File Manager\" width=\"675\" height=\"189\" srcset=\"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105356-0700.jpg 675w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105356-0700-300x84.jpg 300w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105356-0700-50x14.jpg 50w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105356-0700-60x17.jpg 60w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105356-0700-100x28.jpg 100w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><hr \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2034 size-full\" src=\"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105430-0700.jpg\" alt=\"Show hidden files to fix the incorrect PHP version in .htaccess\" width=\"496\" height=\"332\" srcset=\"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105430-0700.jpg 496w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105430-0700-300x201.jpg 300w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105430-0700-50x33.jpg 50w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105430-0700-60x40.jpg 60w, https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-105430-0700-100x67.jpg 100w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/li>\n<li>While still in the <strong>File Manager<\/strong>, navigate to your public_html directory (or your website&#8217;s directory. Generally, this is public_html).\u00a0<\/li>\n<li>Once in the public_html directory, look for the file called .htaccess, right-click the file, and click <strong>edit<\/strong>.     \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle  \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Note<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tLook in your home folder if the mentioned code is not in public_html\/.htaccess.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t<\/li>\n<li>On the edit page for .htaccess, the code to comment out to fix the incorrect PHP version will be located toward the bottom. It will look similar to the following :\u00a0\n<ol>\n<li><code># Use PHP(7|7.1|7.2|7.3|7.4) as default\nAddHandler application\/x-httpd-php(70|71|72|73|74) .php<\/code><\/li>\n<li>You can comment this out by adding # to the left of each line; you&#8217;ll want to comment it all out, then save the file.\u00a0<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>This is not always the solution, but it often fixes an incorrect PHP version display.<\/p>\n<p>The add handler overrides the PHP version you selected from within your cPanel installation and removes your WordPress site&#8217;s incorrect PHP version display issue.<\/p>\n<p>If you cannot fix the incorrect PHP version in WordPress, please <a href=\"https:\/\/www.rochen.com\/docs\/documentation\/how-to-open-a-support-ticket\/\">open a technical support ticket<\/a>\u00a0in your My Rochen account, and our team will be happy to assist.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In some cases, after changing your PHP version from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version (one you did not set.) A solution is to modify your .htaccess file to remove the incorrect hard-coded PHP version. You can do this by following the&#8230;<\/p>\n","protected":false},"author":6,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[29,32],"ht-kb-tag":[242,175,490,270],"class_list":["post-1775","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-cpanel","ht_kb_category-wordpress","ht_kb_tag-htaccess","ht_kb_tag-cpanel","ht_kb_tag-php-version","ht_kb_tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Incorrect PHP Version in WordPress - Rochen Documentation<\/title>\n<meta name=\"description\" content=\"In some cases, after changing your PHP version from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version\" \/>\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.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Incorrect PHP Version in WordPress - Rochen Documentation\" \/>\n<meta property=\"og:description\" content=\"In some cases, after changing your PHP version from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Rochen Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-25T00:27:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700.jpg\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/\",\"url\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/\",\"name\":\"Incorrect PHP Version in WordPress - Rochen Documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/2022-05-18-103340-0700.jpg\",\"datePublished\":\"2021-05-06T16:43:50+00:00\",\"dateModified\":\"2023-04-25T00:27:22+00:00\",\"description\":\"In some cases, after changing your PHP version from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/2022-05-18-103340-0700.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/2022-05-18-103340-0700.jpg\",\"width\":611,\"height\":255,\"caption\":\"File manager icon in cPanel\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/documentation\\\/incorrect-php-version-wordpress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Incorrect PHP Version in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/#website\",\"url\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/\",\"name\":\"Rochen Documentation\",\"description\":\"Official documentation for Rochen&#039;s web hosting services as well as helpful articles for CMS like WordPress, Joomla and Drupal.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rochen.com\\\/docs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Incorrect PHP Version in WordPress - Rochen Documentation","description":"In some cases, after changing your PHP version from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version","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.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"Incorrect PHP Version in WordPress - Rochen Documentation","og_description":"In some cases, after changing your PHP version from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version","og_url":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/","og_site_name":"Rochen Documentation","article_modified_time":"2023-04-25T00:27:22+00:00","og_image":[{"url":"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/","url":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/","name":"Incorrect PHP Version in WordPress - Rochen Documentation","isPartOf":{"@id":"https:\/\/www.rochen.com\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700.jpg","datePublished":"2021-05-06T16:43:50+00:00","dateModified":"2023-04-25T00:27:22+00:00","description":"In some cases, after changing your PHP version from within cPanel, or migrating from another host, WordPress may show an incorrect PHP version","breadcrumb":{"@id":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/#primaryimage","url":"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700.jpg","contentUrl":"https:\/\/www.rochen.com\/docs\/wp-content\/uploads\/2021\/05\/2022-05-18-103340-0700.jpg","width":611,"height":255,"caption":"File manager icon in cPanel"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rochen.com\/docs\/documentation\/incorrect-php-version-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rochen.com\/docs\/"},{"@type":"ListItem","position":2,"name":"Incorrect PHP Version in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/www.rochen.com\/docs\/#website","url":"https:\/\/www.rochen.com\/docs\/","name":"Rochen Documentation","description":"Official documentation for Rochen&#039;s web hosting services as well as helpful articles for CMS like WordPress, Joomla and Drupal.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rochen.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/comments?post=1775"}],"version-history":[{"count":16,"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1775\/revisions"}],"predecessor-version":[{"id":2280,"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1775\/revisions\/2280"}],"wp:attachment":[{"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/media?parent=1775"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=1775"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.rochen.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=1775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}