وردپرس

Function wpdb was called incorrectly wpdb must set a database connection


My website keeps on going down frequently (one every week or so) showing my the regular Database connection error.

After enabling the debug log I’ve got almost 853 PHP notices at the same second (all the notices are at [07-Jul-2023 07:46:46 UTC]). These first 654 notices are:
PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/sitename/wp-includes/class-wpdb.php on line 2019.

What I’ve tried so far: “I’ve searched for this error on stack overflow and some people said they got rid of by changing the host in the wp-config from localhost to 127.0.0.1” this solution didn’t work for me.

And the rest notices are: PHP Notice: Function wpdb was called incorrectly. wpdb must set a database connection for use with escaping. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.) in /var/www/html/7awi/wp-includes/functions.php on line 5865.
I don’t have any custom functions or custom plugins and everything is up to date

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا