Powered by Blogger.

WordPress Multisite “Error establishing a database connection”


You are sure you entered the right database name, database user, and server but still show error “Error establishing a database connection” on the front, what the reason? If you met that in a multisite WordPress installation then it may be caused by the wrong domain name setting in your database.

1. Go to the dashboard such as http://localhost/wordpress-401-mu/wp-admin you will see the following screen.


2. As the screen printed it cannot find out the site localhost/wordpress-401-mu/ in your database table mur_blogs ( if you use default database prefix then it is wp_blogs ).

3. Follow the instruction and open your database with PHPMyAdmin( or other database management tool ), and open the table mur_blogs ( default wp_blogs ). Please change the domain & path to correct as of the following.
* Because you use localhost as the domain in you XAMPP, so domain always should be localhost, and the primary site may be localhost/your-directory-name/sub_site/


No comments