• 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

Resolved Wordpress Error establishing a database connection

p0se

Basic Pleskian
Hello,

I just have a problem with two Wordpress pages of a client.

The customer has three Wordpress pages.
Today I have edited a Wordpress page of the client via the Wordpress extension. I applied the security rules for an instance.

After that two Wordpress pages from the client had the error "establishing a database connection". The pages are the ones I did NOT edit.

First I tried to install a backup.
Unfortunately without success.

After that I tried it as described here.
A WordPress website hosted in Plesk does not work: Error establishing a database connection

Interestingly, the database users no longer existed.
But unfortunately that didn't help either.

After that I used plesk repair for the respective domain.
Also with this I could not fix the error.

The Wordpress pages are displayed as faulty in the Wordpress extension.

WxXYzwp.png


I use Plesk Onyx Version 17.8.11 Update #46
On Ubuntu 18.04.2 LTS‬

Does anyone else have an idea?
 
I'd suggest you contact Plesk Support Team. They will investigate and fix the issue directly on your server.
 
I'd suggest you contact Plesk Support Team. They will investigate and fix the issue directly on your server.

I'm afraid that's not possible.
I get my Plesk license from a hosting provider.

I can only contact Plesk support if I have purchased the Plesk license directly from Plesk. My hosting provider says that I am responsible for the server and does not offer any support.

I think it's a bug. I've seen the same behavior before occasionally.

And do you have a solution?
 
You can easily create a the database user with Plesk database user page and use the same name and password as given in the wp-config.php-file.
 
You can easily create a the database user with Plesk database user page and use the same name and password as given in the wp-config.php-file.

Yeah, I can just do that.
I already did as already described.

But the error remains.
 
Do you see the Wordpress pages when you open them in a browser? In that case, please click the "Refresh" icon in the Wordpress Toolkit title bar to reload the settings of the pages into Wordpress Toolkit.
 
Then you have not set the correct database user or password. Look into wp-config.php of the corresponding site and create a user/password combination for the database mentioned there with the same values. Also check that the database name is correct. If not, change it in the wp-config.php file to the correct database. It does not matter whether you adapt the database, user and password to the content of wp-config.php or the content of wp-config.php to an existing database, user and password. Both ways work. If you are getting "Error establishing a database connection" it simply means that the access credentials are wrong (or maybe the database name).

Once you have corrected these, click "Refresh" again in the WP Toolkit.
 
Back
Top