Wordpress Multisite “Error establishing a database connection” in localhost

后端 未结 11 1406
北荒
北荒 2020-12-24 14:04

When attempting to convert WordPress to a Multisite setup, I get the error:

Error establishing a database connection

I\'m using

11条回答
  •  醉酒成梦
    2020-12-24 14:30

    Had same problem, found 3 possible solutions:

    1. Make sure: DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST in your wp-config.php are really the ones expectected.

    2. As Dima L. mentioned before, define('MULTISITE', true); is expected too.

    3. (what solved it for me) Setting up multi-site for wordpress, changed the 'wp_blogs' table's column 'path' to an undefined location for my website. I changed it to "/" and the DB connection was re-established.

提交回复
热议问题