• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Website DOWN-Error establishing a database connection !!! after security update (wordpress toolkit)

FAPM

Basic Pleskian
Hello, I applied via the wordpress plug-in via plesk (toolkit),
-Rights for files and directories
-Key security

It worked.

Then,

Navigation rights in the directory (can be canceled)
Security of the wp-includes file (can be canceled)
Security of the wp-content file (can be canceled)
Security of the configuration file (can be canceled)
Disable concatenation of scripts on WordPress admin panel (can be canceled)
Disable XML-RPC pingbacks (can be canceled)
Protection against hotlinking (can be canceled)
Disable unused scripting languages
Disable PHP execution in cache folders (can be canceled)
Disable file editing in the WordPress dashboard (is voidable)

I got an error message ...

And since, my site is KO:
Error establishing a database connection
I tried a restoration of the site via plesk, it does not work ...

WPERROR.png

Plesk : 17.8.11 n°33
CentOS Linux 7.6.1810 (Core)‬
 
Last edited:
plesk repair db

Checking the Plesk database using the native database server tools .. [OK]

Checking the structure of the Plesk database ........................ [OK]

Checking the consistency of the Plesk database ...................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0
 
1) Look into wp-config.php and get
a) the password, user name and database name
b) the datbase prefix

2) In the database (use name from (1a)) set the password of the user name to what's listed in wp-config.php.

3) Use phpMyAdmin to look into that database and get the table prefix, then make sure that the same prefix is mentioned in the wp_config.php file for the database.
 
Hi Peter,

/** MySQL database password */
define('DB_PASSWORD', ... actually disappeared
 
There is a serious bug with the wordpress toolkit, why it removes ??? :
/ ** MySQL database password * /
define ('DB_PASSWORD' 'xxxxx';

WordPress Toolkit
Version: 3.5.2-1284

Moreover, it corrupted the wordpress application of the installed site ...
The wordpress application is no longer recognized ...

WPERROR.png

WPERROR1.png
 
For info :

On plesk repair :
Web & FTp : Checking for extra configurations in database not owned by any object There are some unnecessary configurations in the database. Please check Webserver Configuration Troubleshooter detects extra configuration for solution

On file system :

error There is incorrect ownership on some items in the WWW root directory of the domain 'xx'.
error There is incorrect ownership on some items in the WWW root directory of the domain 'xx'.
error There is incorrect ownership on some items in the WWW root directory of the domain 'xx'.
 
Hello, FAPM, let's fix your WordPress first:
1. Check that wp-config.php file contains correct define( 'DB_PASSWORD', '<password>' ); directive. If there is no such directive, please paste it into /** MySQL database password */ section. If you aren't sure that you can remember password correctly, you may change it at Plesk - Domain - <your_domain> - Databases - click on <database_user> - and set new password.
2. After your wp-config.php file contains correct database connecction directives, go to Plesk - WordPress and click on Refresh button for your WordPress instance.
Please let me know if it helped.
 
My Plesk installation failed completely and so I could not do the logIn at Plesks WordPress-Installations anymore.
With the Plesk`s WordPress-Toolkit I did the Backup and made a complete reset of my Strato-V-Server.

When trying to reinstall the wp-backups I got the same errors like described here. There is a simple solution:

1) Uninstall completely (including database-user and database) the WP-Installation you wanted to use for restoring the WP-Backup
2) Open the wp-config.php-file within your WP-Backup and check database-username, database-name, database-password and database-table-prefix.
3) Then install WordPress using WP-Toolkit on Plesk Obsidian using the database-settings from the wp-config
4) Within the Wordpress-Installation in (!) Plesk`s WordPress-Toolkit click on database
5) Open the database using phpMyadmin (open in phpMyadmin)
6) Check for the correct Table-Prefix within the database
7) If the Table-Prefix is wrong (there is a bug within WordPress-Toolkit), click on the first table
a) Click on "Operations" (may be called simular, I have the italian version) and within "table-options" just change the table-prefix (no other part of the name)
b) Repeat this step for all other available tables (do not forget to click on "run/execute" in the name-changing-form)
c) within "user-meta-table" find the values with the incorrect table-prefix and change it using the modification-button
d) search within the other tables for other values containing the incorrect table and change them also
8) Now upload your WordPress-Backup
a) if the upload within the WordPress-Toolkit fails, just do a backup of the installed version, so that the correct-linked WP-Backup-folder will be created
b) Then upload the backup-archive-file manually (using an FTP-client or Windows Remote Connection Client) to the corresponding folder
c) you can find the corresponding folder when (after the useless backup) clicking on the link in the "file-location"-part of the site
9) Reload the Plesk-Page using F5 or the "reload"-button of your browser
10) Reopen the Backup-Section of WordPress-Tooolkit and find the before-uploaded backup-file
11) Click on the Redo-Backup-Button (round-arrow-simbol on the right side within the same row as the correct backup-file is shown)
12) Let WP-Toolkit do all the work needed. Do not wonder, because of the WP-Bug sometimes after an WP-Update (within WordPress) a 500-error will be
shown sometimes, but you can ignore it, after some minutes (1 - 3 Minutes) it will turn to the correct page (using reload-button of your browser)
 
Back
Top