Title: Problem while upgrading from PHP 5 to PHP 7.4
Last modified: May 9, 2020

---

# Problem while upgrading from PHP 5 to PHP 7.4

 *  [abbeytek](https://wordpress.org/support/users/abbeytek/)
 * (@abbeytek)
 * [6 years ago](https://wordpress.org/support/topic/problem-while-upgrading-from-php-5-to-php-7-4/)
 * I upgraded my PHP from 5.5 to 7.4 and since then I have been locked out because
   of the error of the site not being able to locate mysqli.so file in my new installation.
   I have commented it out in my php.ini fiel as it is deprecated but I still found
   out that my site is not opening.
    I enabled the WP_DEBUG and below is the error
   it is displaying on the site now
 * Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /…/…/
   public_html/wp-includes/wp-db.php:1658
 * Stack trace:
    #0 /…/…/public_html/wp-includes/wp-db.php(631): wpdb->db_connect()#
   1 /…/…/public_html/wp-includes/load.php(426): wpdb->__construct(‘##hidden##’,‘##
   hidden##’, ‘##hidden##’, ‘localhost’) #2 /…/…/public_html/wp-siettings.php(126):
   require_wp_db() #3 /…/…/public_html/wp-config.php(113): require_once(‘/…/…’) #
   4 /…/…/public_html/wp-load.php(37): require_once(‘/…/……’) #5 /…/…/public_html/
   wp-blog-header.php(13): require_once(‘/…/…..’) #6 /…/…/public_html/index.php(
   17): require(‘/…/…..’) #7 {main} thrown in /…/…/public_html/wp-includes/wp-db.
   php on line 1658
 * What do I do?

Viewing 1 replies (of 1 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [6 years ago](https://wordpress.org/support/topic/problem-while-upgrading-from-php-5-to-php-7-4/#post-12809139)
 * Switch it back to how it was.
    Then update WordPress and the plugins and themes
   to versions that can use the newer PHP. You can use the PHP Compatibility Checker
   plugin to scan. The WP version 5.2 was the first one that raised the minimum 
   PHP version to 5.6.20.

Viewing 1 replies (of 1 total)

The topic ‘Problem while upgrading from PHP 5 to PHP 7.4’ is closed to new replies.

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [php upgrade](https://wordpress.org/support/topic-tag/php-upgrade/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Joy](https://wordpress.org/support/users/joyously/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/problem-while-upgrading-from-php-5-to-php-7-4/#post-12809139)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
