Unable to install Classicpress 1.5.0

Hi,

I was trying to install Classicpress 1.5.0 on my server with PHP 5.6 and Mysql 5.5 I am getting DB connection error on filling the Database details.The details are correct and I have tested it with a test file. The classicpress installer is unable to connect to the DB and failed to write to the wp-config.php file.

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

** Are you sure you have the correct username and password?*
** Are you sure that you have typed the correct hostname?*
** Are you sure that the database server is running?*

If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the ClassicPress Support Forums.

Expected behavior

Database connection should be made and details should filled in config file.

Current behavior

Error establishing a database connection

Steps to reproduce

  1. Extract the zip
  2. Give the desired permission
  3. Run the installer and fill the Database details.
  4. Save the details and it throws error.

Hi, have you checked if your PHP includes mysql extension and it’s enabled?

This is happening to me also.
A bit of context:

  • Plesk panel (so CP manual install)
  • upload and unzip the files to the correct folder (it sets permissions by default)
  • create DB and user for DB and keep all credentials handy to put in the installer
  • run installer, write database credentials, and such
  • INSTALLER STALLS (with the same message as the OP).

Tried:

  • install everything from scratch several times, with no luck.
  • manually editing wp-config with database credentials. again with no luck, it says it already has a wp-config file and to continue installing if I want to use it then stalls with an error message again about not being able to connect to the database.

To be noted, previous versions of ClassicPress on Plesk did install smoothly as butter. Might it be Plesk messing up things? I noticed my host has WP-CLI and Composer folders (so it supports the use of WP-CLI and Composer I think?), are these of some use to install CP another way to see if I am able to have it done?

Thanks for any advice you can give to shed light on this…

Edited to add: I am using PHP 8 since my host supports it and has recently updated to it.

@jameswill maybe I found the solution because now it works for me.

Steps to correctly install manually (without installers like softaculous)

  • create a database and user for the database, keep credentials handy
  • upload files to the correct location
  • edit wp-config-sample.php with DBASE CREDENTIALS and SALTS VALUES (the given link to generate them will create the SALTS, you need to copy them and paste them in place of the empty ones under the part where you inserted the database credentials. You can also generate them in one of the ways explained on the page that generates them for a more secure install).
  • save the file and run the installer visiting the domain.
  • fill in database credentials and after that, it will ask for site identity and user data proceeding with the installation as expected.

Being that I do not usually install CP manually very often I forgot the SALTS step, and that is why it wasn’t making a database connection for me.

The issue has been identified:

1 Like