Wordpress Fatal error: Uncaught Error: Call to und

2019-04-07 09:42发布

I am in big trouble. I installed a nulled version of woocommerce cart based shipping plugin and i found it not relevant according to my requiremnet and deleted that plugin from plugins area. After deleting that plugin my site went down. Its continuously showing me Fatal error:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/dev/public_html/new/wp-includes/wp-db.php:1570 Stack trace: #0 /home/dev/public_html/new/wp-includes/wp-db.php(658): wpdb->db_connect() #1 /home/dev/public_html/new/wp-includes/load.php(404): wpdb->__construct('dev_test', '3CrSPh8o766F', 'dev_test_ne...', 'localhost') #2 /home/dev/public_html/new/wp-settings.php(107): require_wp_db() #3 /home/dev/public_html/new/wp-config.php(82): require_once('/home/dev/p...') #4 /home/dev/public_html/new/wp-load.php(37): require_once('/home/dev/p...') #5 /home/dev/public_html/new/wp-blog-header.php(13): require_once('/home/dev/p...') #6 /home/dev/public_html/new/index.php(17): require('/home/dev/p...') #7 {main} thrown in /home/dev/public_html/new/wp-includes/wp-db.php on line 1570

I tried replacing all core files excluding wp-config.php and wp-content folder. Still I am getting the same error.

Also, i tried renameing plugins folder but the error is there.

Can you guys suggest me how i can get my site back.

3条回答
smile是对你的礼貌
2楼-- · 2019-04-07 10:26

It happens for me when I switch from 5.6 php to 7.0.

Just enable "mysqli" in your select php version if you use cPanel.

查看更多
Rolldiameter
3楼-- · 2019-04-07 10:30

The error seems be simple, mysql_* functions are not enabled. Check with phpinfo() if these functions are truly disabled, and if yes, enable it. If no, there are some problems in the code that you are using, but if you have replaced all files as you write, is most probably the first option.

查看更多
趁早两清
4楼-- · 2019-04-07 10:44

Possible error sources:

You can set

define('WP_USE_EXT_MYSQL', true);

in your wp-config.php file to make WordPress use the mysqli extension.

查看更多
登录 后发表回答