Updating WordPress to use mysqli instead of mysql

Solution:

At first, check this tool. It can help to migrate from mysql_* to mysqli_*.

If not, simply extend wpdb:

  1. Write a class with getter for “$dbh“:
  2. Use it everywhere instead of base class (this link can help)