How to remove broken wordpress installation completely - retest YNH settings for fresh installation

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.12
How are you able to access your server: The webadmin
SSH

Describe your issue

After failing to restore an backup of an old wordpress installation

had to do

yunohost app remove wordpress

to try to do a fresh wordpress installation

but get error

ERROR 1049 (42000): Unknown database ‘wordpress’

ERROR 2019 (00000): Can’t initialize character set (path: compiled_in)

Somehow not all got removed by yunohost app remove wordpress

What could i try ? Thanks for help

Share relevant logs or error messages

You could verify if the database wordpress is still present in mysql, connect by ssh

sudo -i
mysql -u root
SHOW DATABASES;

If you see a database wordpress, remove it

DROP DATABASE wordpress;

Perhaps see also if the user ``wordpress` is still here

SELECT user FROM mysql.user;

if tou see a user wordpress

DROP USER 'wordpress'@'localhost';

To quit mysql

quit;

But if the app has been removed, it should have removed also the database ??

You restore app is very old, 5.8.2~ynh, 3 years ago !

@rodinux thanks for your support

well - updates by YNH did not work for some time so i updated the installation within WP - this my cause problems now..

still not understand why i can´t install a new fresh WP installation now even so no wordpress db is present - i will check `
``
DROP USER ‘wordpress’@‘localhost’;

Here you have an error for the restore app, but it did not remove the fisrt steps to restore wordpress…
Perhaps firts verify if th app exist and remove it if exist

yunohost app list
yunohost app remove wordpress

If the app is not present, you must remove or rename the folder created by the restore

mv /var/www/wordpress /var/www/wordpress-OLD #rename it or delete
rm -r /var/www/wordpress

and then remove from mysql the database and db user

i did

yunohost app remove wordpress

First try to remove the database and user if exist in mysql, then if you really want restore your old wordpress I can help you to restore it by another way…

Have you done all the migrations needed in the upgrade for Yunohost 12 ?