技术,  网站

After upgrading Ubuntu Workpress stopped working

The reason is php got updated to 8.
You will get:
`Your PHP installation appears to be missing the MySQL extension which Is required by WordPress`

Just do:

apt-get install php8.0-mysql

And restart your apache

sudo service apache2 restart

Update on Jan 21, 2023

after upgrading to Ubuntu 22.04, all php shows source code:

cd /etc/apache2
ls -l mods-*/*php*

-rw-r--r-- 1 root root 855 Nov 25  2021 mods-available/php7.4.conf
-rw-r--r-- 1 root root 102 Nov 25  2021 mods-available/php7.4.load
-rw-r--r-- 1 root root 855 Oct 19 07:58 mods-available/php8.1.conf
-rw-r--r-- 1 root root 101 Oct 19 07:58 mods-available/php8.1.load


sudo apt-get install apache2 php8.1 libapache2-mod-php8.1
a2query -m php8.1
sudo a2enmod php8.1
sudo service apache2 restart

Then showing “`Your PHP installation appears to be missing the MySQL extension which Is required by WordPress`” again:

apt-get install php8.1-mysqlnd
sudo service apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *