You should be using the plain text password in wp-config.php.
Thank you Steve Stern for your answer, but it doesn’t works so. The original installation generated by WordPress created this lines:
define(‘DB_PASSWORD’, ‘(removed)’);
I tried your proposal, but it doesn’t work.
-
This reply was modified 1 year, 7 months ago by
Samuel Wood (Otto). Reason: Removed password
That should be the unencrypted password. That’s how I’ve set up every WP site.
That isn’t an encrypted password, that’s the actual password. WordPress doesn’t encrypt that password, and it doesn’t have any means to decrypt it. It sends that password to the MySQL server, as-is.
Steve and Samuel:
Ok, I’ll try again, and give you an answer.
Thank you again for your answers.
Hi!
The password problem is solved, but I get the error message that I copy under this text. It says that user and password are Ok, but it can’t access the Database. From PHPMyadmin I can access perfectly to the database, and navigate its tables.
Thank you in advance again!
(XID p6zsxs) The system failed to run the wp-cli batch commands with the following issues: STDERR: Error: Can’t select database. We were able to connect to the database server (which means your username and password is okay) but not able to select the
unitasne_unitasdatabase. Cpanel::Exception::ProcessFailed::Error/(XID cfhxz9) “/usr/local/bin/php” informó el código de error “1” cuando finalizó: Error: Can’t select database. We were able to connect to the database server (which means your username and password is okay) but not able to select the
unitasne_unitasdatabase. “/usr/local/bin/php” reported error code “1” when it ended: Error: Can’t select database. We were able to connect to the database server (which means your username and password is okay) but not able to select the
unitasne_unitasdatabase. at /usr/local/cpanel/Cpanel/ChildErrorStringifier.pm line 150. Cpanel::ChildErrorStringifier::die_if_error(Cpanel::SafeRun::Object=HASH(0x1f56ca0)) called at /usr/local/cpanel/Cpanel/SafeRun/Object.pm line 534 Cpanel::SafeRun::Object::new_or_die("Cpanel::SafeRun::Object", "program", "/usr/local/bin/php", "args", ARRAY(0x1f55d28), "timeout", 20, "stdin", ...) called at /usr/local/cpanel/Cpanel/WordPress/WpCli.pm line 80 Cpanel::WordPress::WpCli::wp_cli("wp_dir", "/home/unitasne/public_html", "wp_cache_dir", "/usr/local/cpanel/php/wp-cli/cache", "wp_config_path", "/usr/local/cpanel/php/wp-cli/config", "wp_packages_dir", "/usr/local/cpanel/php/wp-cli/packages", ...) called at /usr/local/cpanel/Cpanel/WordPress/WpCli.pm line 145 Cpanel::WordPress::WpCli::__ANON__() called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/Try/Tiny.pm line 97 eval {...} called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/Try/Tiny.pm line 88 Try::Tiny::try(CODE(0x1f56448), Try::Tiny::Catch=REF(0x1006e88)) called at /usr/local/cpanel/Cpanel/WordPress/WpCli.pm line 166 Cpanel::WordPress::WpCli::batch("wp_dir", "/home/unitasne/public_html", "text", "# core version returns a string that needs special handling\x{a}#"...) called at /usr/local/cpanel/Cpanel/WordPress/Instances.pm line 372 Cpanel::WordPress::Instances::_load_expensive(HASH(0x179f488), HASH(0x1facf38)) called at /usr/local/cpanel/Cpanel/WordPress/Instances.pm line 304 eval {...} called at /usr/local/cpanel/Cpanel/WordPress/Instances.pm line 304 Cpanel::WordPress::Instances::get_instance_by_id("cPanel::Blogs::WordPressUnmanaged.0.1552220000") called at /usr/local/cpanel/Cpanel/API/WordPressInstanceManager.pm line 293 Cpanel::API::WordPressInstanceManager::get_instance_by_id(Cpanel::Args=HASH(0x13efb58), Cpanel::Result=HASH(0x13ef978)) called at /usr/local/cpanel/Cpanel/API.pm line 372 eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 374 Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x13efb58), Cpanel::Result=HASH(0x13ef978), "WordPressInstanceManager", "get_instance_by_id") called at /usr/local/cpanel/Cpanel/API.pm line 229 Cpanel::API::execute("WordPressInstanceManager", "get_instance_by_id", HASH(0x13ef6d8)) called at /usr/local/cpanel/Cpanel/API.pm line 657 Cpanel::API::run_api_mode(HASH(0x13ef6d8)) called at uapi.pl line 315 main::script() called at uapi.pl line 145
If you have been messing around with the mySQL user and password and such, then you may not have given access to that database to the user in question.
I don’t know what specifically you have been doing to the DB, but this command might be what you need:
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Either that, or you just have the wrong DBNAME in the config.
Samuel:
The site where my page is located was hacked some days ago. That must be origin of the problem.
Thank you for your answer. I’ll see if it works.