title: Error "Your php installation appears to be missing the mysql extension which is required by wordpress" on Ubuntu 18.0.4. and PHP 7.2
body: <p>I have recently updated my Ubuntu version from 16.04 to 18.0.4 with PHP version upgraded to 7.2. I haven't been able to log on to my Wordpress websites due to the following error:</p>
  
  <blockquote>
    <p>Your php installation appears to be missing the mysql extension which is required by Wordpress</p>
  </blockquote>
  
  <p>What I have tried:<br>
  - sudo apt-get update &amp; sudo apt-get -y install php-mysql<br>
  - sudo update-alternatives --set php /usr/bin/php7.2<br>
  * while checking if the last one worked with wp --info, I also got the following warning:</p>
  
  <blockquote>
    <p>PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20170718/mysqli (/usr/lib/php/20170718/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/mysqli.so (/usr/lib/php/20170718/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0</p>
  </blockquote>
  
  <p>These were in fact missing from php.ini. I added both <br></p>
  
  <pre><code>extension=/usr/lib/php/20170718/mysqli
  and
  extension=/usr/lib/php/20170718/mysqlnd.
  </code></pre>
  
  <p>The PHP warning disappeared, but the MySQL extension still seems to be missing.</p>
  
  <p>The php.ini file is located at /etc/php/7.2/cli/php.ini. I restarted apache after each change I made.</p>
  
  <p>Would you have any other solution that might work?</p>
  
  <p>Thanks a lot in advance.</p>