This category is for issues regarding specific apps, NOT general issues with YunoHost.
on
This form is written in English but feel free to write in French if youâre more comfortable!
on
What type of hardware are you using
Other ARM board
What YunoHost version are you running
11.2.30.2
What app is this about
wordpress
Describe your issue
When i try to backup my wordpress app, i receive the error below. my wordpress install doesnât use db name âwordpressâ (it was copied over from another non-ynh system), it has its own name.
is there a way to tell the backup scripts the name of my wordpress database?
Share relevant logs or error messages
mysqldump: Got error: 1049: âUnknown database âwordpressââ when selecting the database
you donât want to change all the scripts install, remove, backup, restore, change-url of the package maintained and there the db has a name, a user and a password saved in the settings of the app. There are not a variables⊠But you can install a wordpress, drop the database and import a db with mysql in the wordpress dbâŠ
If you do not wish to modify your wordpress installation, why was the database name changed from the default? What benefit does the non-default database name provide?
my short-term suggestion is to just to copy the file somewhere. Iâd give an example but I know neither the modified database name, nor the path to it.
Yunohost is supposed to make it easier for a user to manage a server so he doesnât have to worry about certificates, databases, nginx configuration, backup, restore, upgrade. So itâs better to stick with what the scripts provide.
In your case, making custom changes requires to manage all the processes yourself and thatâs not what you want when choosing yunohost to manage your server.
To get your problem solved, you have to make your app installation standard so the backup, restore would be easy.
Install phpmyadmin, export your database, open the database named WordPress, drop everything, import the database you exported.
Before you start you need the database password stored in yunohost settings, so run sudo yunohost app setting wordpress db_pwd. This will show you the password for the WordPress database.
Open the WordPress config file using : sudo yunohost app shell wordpress
Then nano wp-config.php
Change the database name to wordpress and the database user to wordpress and the password you got from the previous command.
Save it and check your website is working fine by opening a private tab (so your browser doesnât use the cache).
Now try running the backup script from the webadmin.
Good luck
as i already mentioned, it wasnât changed from the default, the WP site was migrated from another host. it doesnât provide any benefit, it just is different.