Upgrading Ubuntu 22.04 to 24.04 While Running a Live WordPress Site

I was today years old when I realized that my hosting service (Linode) allows for one snapshot. This finally gave me the impetus to upgrade Ubuntu since I’m comforted knowing there’s a one button rollback.

First thing I did was update all my WordPress plugins.

Then I ran the following sequence:

sudo apt update && sudo apt upgrade -y     # get current on 22.04 first
sudo reboot                                 # clear any pending kernel
sudo do-release-upgrade                     # the main event

Everything worked fine except Apache would not start and was giving me: AH00534: apache2: Configuration error: No MPM loaded.

I fixed it with:

sudo apt install libapache2-mod-php8.3
sudo a2dismod mpm_event 2>/dev/null
sudo a2enmod mpm_prefork
sudo a2enmod php8.3
sudo systemctl restart apache2

After that I got the following error:

Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php8.1.load: Cannot load /usr/lib/apache2/modules/libphp8.1.so into server: /usr/lib/apache2/modules/libphp8.1.so: cannot open shared object file: No such file or directory

Which I fixed with:

sudo a2dismod php8.1

The site came up fine and WordPress was mostly working. MonsterInsights was complaining. I poked it with a stick a few times and couldn’t figure it out so I just disabled the plugin.

Not like anyone reads my blog anyways, right?


Posted

in

, ,

by

Tags: