Wordpress install fails because of database connection error

What app is this about, and its version: wordpress 6.9
What YunoHost version are you running: nextcloud 13.0.4
What type of hardware are you using: VPS bought online

Describe your issue

1.) installed wordpress with multisite enabled.
2.) changed mind to not have multisite enabled.
3.) uninstalled wordpress via yunohost web admin.
4.) installed wordpress without multisite and getting an error during install:

Share relevant logs or error messages

2026-02-14 17:50:50,601: DEBUG -

Error establishing a database connection


2026-02-14 17:50:50,601: DEBUG -

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


2026-02-14 17:50:50,602: DEBUG -

    2026-02-14 17:50:50,602: DEBUG -
  • Are you sure you have the correct username and password?

  • 2026-02-14 17:50:50,602: DEBUG -
  • Are you sure you have typed the correct hostname?

  • 2026-02-14 17:50:50,602: DEBUG -
  • Are you sure the database server is running?

  • 2026-02-14 17:50:50,602: DEBUG -

2026-02-14 17:50:50,602: DEBUG -

If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.


2026-02-14 17:50:50,602: DEBUG -

2026-02-14 17:50:50,602: DEBUG -
2026-02-14 17:50:50,602: DEBUG - + [[ yes == \n\o ]]
2026-02-14 17:50:50,602: DEBUG - + ynh_print_info ‘Please wait during Wordpress installation…’
2026-02-14 17:50:50,603: DEBUG - ++ seq 1 300
2026-02-14 17:50:50,603: DEBUG - + for i in seq 1 300
2026-02-14 17:50:50,603: DEBUG - + ynh_mysql_db_shell
2026-02-14 17:50:50,603: DEBUG - + local database=wordpress
2026-02-14 17:50:50,603: DEBUG - + grep --quiet wp_options
2026-02-14 17:50:50,603: DEBUG - + default_character_set=()
2026-02-14 17:50:50,603: DEBUG - + [[ -n wordpress ]]
2026-02-14 17:50:50,603: DEBUG - + default_character_set=(–default-character-set “$(mysql -B “$database” <<< ‘show variables like “character_set_database”;’ | tail -n1 | cut -f2)”)
2026-02-14 17:50:50,604: DEBUG - ++ mysql -B wordpress
2026-02-14 17:50:50,604: DEBUG - ++ tail -n1
2026-02-14 17:50:50,604: DEBUG - ++ cut -f2
2026-02-14 17:50:50,611: WARNING - ERROR 1049 (42000): Unknown database ‘wordpress’

Database server is up and running. Phpmysql works fine. There was first a database “wordpress” until the uninstallation. Now that is gone.

No folder in /var/www/ with name wordpress.
No database in myqsl with name wordpress.
No user or group in /etc files, only in the backup files with - at the end.

Root cause found:

there was another database on the server with the name “wordpress-abcd-backup”. After renaming the database to “abcd-backup” the installation of wordpress worked!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.