Having issues upgrading PHP to 7.4 from WP 5.9.2. Website acces shows MySQL error

Avatar
  • updated
  • Answered

I get the following error after upgrading to PHP 7.4 on my WP 5.9.2 version.

Error thrown

Call to undefined function mysql_real_escape_string()

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

Hello, and sorry to hear that you're having trouble with the PHP upgrade on your WordPress site. 

In situations like this, the error is usually caused by an out of date WordPress plugin. mysql_real_escape_string() is a function that is no longer supported in newer PHP versions. The most common way to trouble shoot this issue is to deactivate all of your plugins, then reactivate them one by one until you find the one causing the error. Be sure to take backups first!

After that, you can troubleshoot the plugin causing the error by updating it, reaching out to the plugin developer, or replacing it. Hope that helps!

Avatar
anonymous
  • Answer
  • Answered

Hello, and sorry to hear that you're having trouble with the PHP upgrade on your WordPress site. 

In situations like this, the error is usually caused by an out of date WordPress plugin. mysql_real_escape_string() is a function that is no longer supported in newer PHP versions. The most common way to trouble shoot this issue is to deactivate all of your plugins, then reactivate them one by one until you find the one causing the error. Be sure to take backups first!

After that, you can troubleshoot the plugin causing the error by updating it, reaching out to the plugin developer, or replacing it. Hope that helps!