PHP & MySQL Examples

All working PHP and MySQL examples!

Fix for: “WordPress database error MySQL server has gone away for query…”

Posted on May 12, 2012 in PHP & MySQL Examples

Below is the fix for error “WordPress database error MySQL server has gone away for query…”. Edit the file wp-db.php located in wp-includes folder. Search for this line “$this->set_charset( $this->dbh );” around line 1054. add in this line $this->set_charset( $this->dbh ); between $this->ready = true; and $this->select( $this->dbname, $this->dbh ); Before editing: After editing: The error can found on your WordPress folder and the file is called error_log (if...

Read More