VPSSIM recently recognized that many sites using WordPress plugins named “Duplicator” caused the “Error establishing a database connection” error. The general signs of these websites are:
– “Error establishing a database connection” error, but the administrator did not change the database login information;
– The wp-config.php file is reset to empty as the new page does not configure the database information, or the database configuration information is incorrect.
1. First, you need to configure the database connection information to operate the website again
You need to reconfigure the connection to the database in the wp-config.php file located in the directory containing your code, because normally when the error occurs, then the information DB_Name, DB_User and DB_Password in wp-config.php. will be left blank or replaced with inaccurate information, so you need to re-correct to the actual configuration on your hosting:
2. Update the latest version of Duplicator and follow up
You go to the site admin (wp-admin), go to the management of the Plugins and update the latest version of the Duplicator, maybe in this new version the error to change the information in the file wp- config.php has been fixed by the publisher.
After the update is complete, you need to proceed to website tracking a more time to see if the error still occurs.
3. Remove Duplicator and replace it with the same function plugin
If you have updated the Duplicator to the latest version and the above error still occurs, the last solution is to replace the Duplicator with another plugin with the same function can meet your requirements (such as UPDRAFTPLUS , ALL-IN-ONE WP MIGRATION, BACKUPBUDDY, WP MIGRATE DB PRO).
Duplicator itself has been identified by many security experts as a plugin that is easy to hackers exploit to insert malicious code into your website (see more: https://securitydaily.net/plugin-wordpress-cu / bin / thac-tuong /), so using a plugin with similar but more secure features to replace Duplicator is also a solution that you should consider thoroughly.