{"id":28893,"date":"2022-02-11T10:07:24","date_gmt":"2022-02-11T15:07:24","guid":{"rendered":"https:\/\/codebangers.com\/?p=28893"},"modified":"2022-02-17T10:39:59","modified_gmt":"2022-02-17T15:39:59","slug":"plesk-php-version-not-matching-command-line","status":"publish","type":"post","link":"https:\/\/codebangers.com\/plesk-php-version-not-matching-command-line\/","title":{"rendered":"Plesk PHP Version Not Matching Command Line"},"content":{"rendered":"<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;paraiso-dark&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">echo \"PATH=\/opt\/plesk\/php\/7.1\/bin:$PATH\" &gt;&gt; ~\/.bash_profile<\/pre>\n<\/div>\n<p>Replace the version number with the one you have set.<\/p>\n<p><img decoding=\"async\" class=\"size-large wp-image-28894 alignnone\" src=\"https:\/\/codebangers.com\/wp-content\/uploads\/2022\/02\/plesk-php-500x42.png\" alt=\"\" width=\"500\" height=\"42\" srcset=\"https:\/\/codebangers.com\/wp-content\/uploads\/2022\/02\/plesk-php-500x42.png 500w, https:\/\/codebangers.com\/wp-content\/uploads\/2022\/02\/plesk-php-555x47.png 555w, https:\/\/codebangers.com\/wp-content\/uploads\/2022\/02\/plesk-php-300x25.png 300w, https:\/\/codebangers.com\/wp-content\/uploads\/2022\/02\/plesk-php-768x65.png 768w, https:\/\/codebangers.com\/wp-content\/uploads\/2022\/02\/plesk-php.png 1083w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Then close out the terminal and reopen.\u00a0 Run php -v and you should see the correct version.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;duotone-dark&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">php -v\r\n\r\nPHP 7.4.27 (cli) (built: Dec 23 2021 14:48:17) ( NTS )\r\nCopyright (c) The PHP Group\r\nZend Engine v3.4.0, Copyright (c) Zend Technologies\r\n    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by                                                                              \r\nionCube Ltd.\r\n    with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>echo &#8220;PATH=\/opt\/plesk\/php\/7.1\/bin:$PATH&#8221; &gt;&gt; ~\/.bash_profile Replace the version number with the one you have set. Then close out the terminal and reopen.\u00a0 Run [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":300,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[402,4],"tags":[404,8,405,403],"class_list":["post-28893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-plesk","category-php","tag-command-line","tag-php-2","tag-php-version","tag-plesk"],"_links":{"self":[{"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/posts\/28893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/comments?post=28893"}],"version-history":[{"count":3,"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/posts\/28893\/revisions"}],"predecessor-version":[{"id":28937,"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/posts\/28893\/revisions\/28937"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/media\/300"}],"wp:attachment":[{"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/media?parent=28893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/categories?post=28893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codebangers.com\/wp-json\/wp\/v2\/tags?post=28893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}