• satimis

    (@satimis)


    I have WordPress websites running locally on Ubuntu 20.04 desktop without problem

    After upgrade Ubuntu 20.04 VM to 22.04 all websites unable tp browse.

    On browser running;
    111.222.333.444/website-name/

    111.222.333.444 is local IP address

    Warning:
    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

    Is there any way to fix the problem? Thanks

    Regards

    • This topic was modified 2 years ago by satimis.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You’re missing o ne or more PHP extensions. Try sudo apt install php-mysql

    https://tecadmin.net/install-lamp-ubuntu-20-04/

    Thread Starter satimis

    (@satimis)

    Hi,

    Thanks for your advice.

    $ apt policy php-mysql
    php-mysql:

      Installed: (none)
      Candidate: 2:8.1+92ubuntu1
      Version table:
         2:8.1+92ubuntu1 500
            500 https://hk.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
            500 https://hk.archive.ubuntu.com/ubuntu jammy/main i386 Packages

    $ sudo apt install php-mysql
    it went through without complaint.

    On browser run;
    ip-address/website-name
    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

    Still the same.

    On browser run;
    ip-address/
    starts “Apache2 Ubuntu Default Page”

    Regards

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    This is not a WordPress problem. Please take it to your favorite Ubuntu support site or mailing list.

    Thread Starter satimis

    (@satimis)

    Hi Steven,

    Thanks for your advice.

    I have posted my problem on their support forum at the same time posting my problem here. But up to now there is no reply.

    Regards

    Thread Starter satimis

    (@satimis)

    Hi Steven,

    Again.

    Your advise works on this VM. I need to reboot the VM. Now the WordPress websites on this VM work. I can browse them running on browser;

    111.222.333.444/website-name.

    Thanks again.

    But I have another Ubuntu 22.04 VM, also upgraded from Ubuntu 20.04. There are WP websites running on it. On Terminal running;

    111.222.333.444/website-name
    showming;
    Error establishing a database connection

    Do you have advice to fix the problem? Thanks

    Regards

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Is the database running? If so, then verify the values in wp-config.php in the DB defines. Also, are you using MariaDB or MySQL?

    Thread Starter satimis

    (@satimis)

    Hi,

    $ sudo service mariadb status

    ● mariadb.service - MariaDB 10.6.7 database server
         Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
         Active: active (running) since Sun 2022-11-20 00:14:04 HKT; 3min 29s ago
           Docs: man:mariadbd(8)
                 https://mariadb.com/kb/en/library/systemd/
        Process: 812 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
        Process: 841 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
        Process: 847 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=<code>cd /usr/bin/..; /usr/bin/galera_recovery</code>; [ $? ->
        Process: 1128 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
        Process: 1130 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
       Main PID: 915 (mariadbd)
         Status: "Taking your SQL requests now..."
          Tasks: 8 (limit: 11862)
         Memory: 97.7M
            CPU: 1.518s
         CGroup: /system.slice/mariadb.service
                 └─915 /usr/sbin/mariadbd
    
    Nov 20 00:14:04 multisite012204 mariadbd[915]: 2022-11-20  0:14:04 0 [Note] /usr/sbin/mariadbd: ready for connections.
    Nov 20 00:14:04 multisite012204 mariadbd[915]: Version: '10.6.7-MariaDB-2ubuntu1.1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Ubuntu 22.>
    Nov 20 00:14:04 multisite012204 systemd[1]: Started MariaDB 10.6.7 database server.
    Nov 20 00:14:04 multisite012204 /etc/mysql/debian-start[1132]: Upgrading MySQL tables if necessary.
    Nov 20 00:14:04 multisite012204 /etc/mysql/debian-start[1135]: Looking for 'mysql' as: /usr/bin/mysql
    Nov 20 00:14:04 multisite012204 /etc/mysql/debian-start[1135]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
    Nov 20 00:14:04 multisite012204 /etc/mysql/debian-start[1135]: This installation of MariaDB is already upgraded to 10.6.7-MariaDB.
    Nov 20 00:14:04 multisite012204 /etc/mysql/debian-start[1135]: There is no need to run mysql_upgrade again for 10.6.7-MariaDB.
    Nov 20 00:14:04 multisite012204 /etc/mysql/debian-start[1135]: You can use --force if you still want to run mysql_upgrade
    Nov 20 00:14:04 multisite012204 /etc/mysql/debian-start[1143]: Checking for insecure root accounts.
    lines 1-28/28 (END)

    Is it running?

    How to verify DB defines on wp-config.php ?

    I’m running MariaDB

    Thanks

    Regards

    • This reply was modified 2 years ago by satimis.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    “How to verify DB defines on wp-config.php ?”

    Try logging in from the command line using each parameter

    mysql -u DB_USER -pDB_PSW -h DB_HOST DB_NAME

    with appropriate subsitutions.

    Thread Starter satimis

    (@satimis)

    Performed following steps;

    $ sudo nano /var/www/html/ballet/wp-config.php

    Add following line to the end of the file;
    mysql -u "ballet" -pDB_PSW "balletpw" -h "localhost" "balletDB"

    Reboot PC

    111.222.333.444/ballet/
    This page isn’t working 111.222.333.444 is currently unable to handle this request.

    Still fail

    • This reply was modified 2 years ago by satimis.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    NO NO NO, do not put that in wp-config.pphp.

    I suggested you try to login to MySQL from the command line, NOT from within WordPress.

    Thread Starter satimis

    (@satimis)

    Hi Steven,

    I’ll not continue to re-active the cloned websites on this VM.

    There are 2 VMs running as the backup server of my live websites on Internet. I have 38 websites running on Internet. The hosting plan subscribed by me only allows to have 2 backup of my live websites therefore I maintain the VM as the backup server of my live websites. They are not open to public. The local cloned websites were created on Duplicator packages.

    Now 1 VM is working. The 2nd VM is only the cloned VM of the 1st one. I won’t continue to save the 2nd VM. When I have time I’ll build a new LAMP server on a new Ubuntu 22.04 desktop (clean installation) and then clone all live websites on it.

    Anyway lot of thanks for your advice and time spent to help me.

    Best Regards

    • This reply was modified 2 years ago by satimis.
    • This reply was modified 2 years ago by satimis.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Unable to browse website’ is closed to new replies.