When I first setup WordPress on OpenBSD I followed Michael W. Lucas’s book, “Httpd and Relayd”. Actually, this was my first experience ever setting up WordPress on any server. The steps Michael gave made setting it up straightforward. But, when there was an update to WordPress 5.3 yesterday, I felt a bit nervous. I couldn’t find a howto or tutorial on how to upgrade WordPress in a chroot.
httpd on OpenBSD runs in a chroot. I thought this would prove to be a huge problem but it wasn’t too difficult to update.
In addition to Michael’s book mentioned above, the WordPress documentation on doing a manual upgrade was also helpful.
I adapted the above instructions from WordPress’s to the fact that WordPress runs in a chroot on OpenBSD.
To begin with, I downloaded the latest updated stable code from WordPess.
Unpack the gzipped tarball and remove the old wp-includes and wp-admin directories
tar -xzf latest.tar.gz
doas rm -r /var/www/htdocs/wp-includes/ /var/www/htdocs/wp-admin/
Now, update all the files without removing your own content.
doas rsync --update -ra --progress wordpress/ /var/www/htdocs/
All of our fresh files from WordPress are in place. Let’s fix the permissions on those files.
doas chown -R www:www /var/www/htdocs
That’s all I needed to do. I have a simple setup. Your mileage may vary.