{"id":1600,"date":"2024-10-04T00:45:07","date_gmt":"2024-10-03T22:45:07","guid":{"rendered":"https:\/\/www.shukko.com\/x3\/?p=1600"},"modified":"2024-10-04T00:45:07","modified_gmt":"2024-10-03T22:45:07","slug":"switching-updating-php-versions-directadmin","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2024\/10\/04\/switching-updating-php-versions-directadmin\/","title":{"rendered":"Switching \/ updating PHP versions DirectAdmin"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code># Switching \/ updating PHP versions\n\nMake a backup\n\n    tar czvf ~\/domain-conf-backup.tgz \/usr\/local\/directadmin\/data\/users\/**\/domains\/*.conf\n\nForce PHP to be version 1 if no default is set\n\n    grep -rF -L php1_select \/usr\/local\/directadmin\/data\/users\/**\/domains\/*.conf | xargs sed -i.step1 '$ a php1_select=1'\n\nChange new version to temporary position\n\n    grep -rF -l 'php1_select=3' \/usr\/local\/directadmin\/data\/users\/**\/domains\/*.conf | xargs sed -i.step2 's\/^php1_select=3\/php1_select=31\/'\n\nChange old version to old position\n\n    grep -rF -l 'php1_select=1' \/usr\/local\/directadmin\/data\/users\/**\/domains\/*.conf | xargs sed -i.step3 's\/^php1_select=1\/php1_select=3\/'\n\nChange new version to new position\n\n    grep -rF -l 'php1_select=31' \/usr\/local\/directadmin\/data\/users\/**\/domains\/*.conf | xargs sed -i.step4 's\/^php1_select=31\/php1_select=1\/'\n\nAdjust PHP versions inside custombuild\n\n    DO THIS MANUALLY\n\nRewrite config files\n\n    cd \/usr\/local\/directadmin\/custombuild &amp;&amp; .\/build rewrite_confs<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1600","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=1600"}],"version-history":[{"count":1,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1600\/revisions"}],"predecessor-version":[{"id":1601,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1600\/revisions\/1601"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=1600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=1600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=1600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}