You are working on some project and just decide to look at an older WordPress site that should be just sitting there humming along, and see this…

Fatal error message on

Fatal is not pretty.

My hunch is that since it is a reference to “undefined function mysql_connect()” that it’s related to the changes in PHP 7 – I only know this from dealing with it on another non WordPress site before. In that case, my response was to bury my head in the sand and revert the server on that site to PHP5 rather than recode my old stuff.

But this is WordPress, which should work.

What’s my way through it? Not very technical.

It’s a big shock.

I copied this part of the error message Fatal Error. Uncaught Error: Call to undefined function mysql_connect() in wp-includes/wp-db.php and googled it.

There were quite a few possible results, but this one from looked (and was) on target- specifically this suggestion to delete a line from wp-config.php. I launched my cpanel, went into the File Manager, found the file. Rather then deleting, I simply put a # in front of the line so it was commented it out.

Commenting out line 52 “define(‘WP_USE_EXT_MYSQL’, true);”

I don’t even know what this does… except make the site work as it should. And I’m really glad because the other suggestions looked a bit more hairy.

A good percentage of my work is looking stuff up, weighing the sources and differences in suggestions, and just trying stuff. I rely heavily on the ‘net don’t go messing with that, ok?

Featured Image: According to Google this is a photo from Air Force Medical Service Unit although it does not appear on the link I followed. Maybe it was a featured image removed from a post? Where does your Creative Commons Choo Choo train metaphor go from here? Oh well, as a photo from a US Government agency, it should be public domain. Call my lawyer!

Even brain surgeons get stumped? Or laugh about it? Air Force Medical Unit photo.
If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as

Leave a Reply

Your email address will not be published. Required fields are marked *