{"id":196,"date":"2021-11-07T03:33:29","date_gmt":"2021-11-07T09:33:29","guid":{"rendered":"https:\/\/donaldfcooley.info\/?p=196"},"modified":"2021-11-08T20:01:24","modified_gmt":"2021-11-09T02:01:24","slug":"upgrading-php-on-openbsd","status":"publish","type":"post","link":"https:\/\/donaldfcooley.info\/?p=196","title":{"rendered":"upgrading php on openbsd"},"content":{"rendered":"\n<p>First take a snapshot or backup of your server.<br><br>Then, we&#8217;ll take a backup of our php-fpm.conf file<br>because if we uninstall php-7.3 it will remove this file too.<br>doas cp php-fpm.conf php-fpm.conf.bak<br><br>Now, let&#8217;s stop our instance of php-7.3<br>doas rcctl stop php-7.3<br><br>install php-curl which will pull in php as well.<br>doas pkg_add -iv php-curl<br><br>When presented with a list of php-versions pick php-7.4<br><br>Also, install php-zip and pecl74-imagick.<br>doas pkg_add -iv php-gd php-zip pecl74-imagick<br><br>Remember, none of these modules are activated by default by OpenBSD.<br>In order to activate them, we need to copy them from \/etc\/php-7.4.sample<br>directory to \/etc\/php-7.4<br><br>cd \/etc\/php-.7.4<br>doas cp ..\/php-7.4.sample\/* .<br><br>Now with our files in place and php upgraded, lets edit our<br>\/etc\/rc.conf.local file and change php73_fpm to php74_fpm<br><br>And we can now start up php74_fpm<br>doas rcctl start php74_fpm<br><br>Refresh our website and make sure WordPress is running fine.<br><br>Now we can delete php-7.3<br>doas pkg_delete -iv php-7.3<br><br>This will also remove php-fpm.conf and our site will be broken.<br>Fortunately we made a backup of this file.<br>doas mv \/etc\/php-fpm.conf.bak \/etc\/php-fpm.conf<br><br>Do some file cleanup<br>doas rm -r \/etc\/php-7.3 \/usr\/local\/share\/php-7.3<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>First take a snapshot or backup of your server. Then, we&#8217;ll take a backup of our php-fpm.conf filebecause if we uninstall php-7.3 it will remove this file too.doas cp php-fpm.conf php-fpm.conf.bak Now, let&#8217;s stop our instance of php-7.3doas rcctl stop php-7.3 install php-curl which will pull in php as well.doas pkg_add -iv php-curl When presented &hellip; <a href=\"https:\/\/donaldfcooley.info\/?p=196\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">upgrading php on openbsd<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[34,41,35],"class_list":["post-196","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-openbsd","tag-php","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts\/196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=196"}],"version-history":[{"count":2,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions"}],"predecessor-version":[{"id":198,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions\/198"}],"wp:attachment":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}