I have a WordPress website, which I wanted to move to a new hosting provider, so I ftp-ed all the website files to my computer. After I cancelled the old hosting, I realised that I forgot to copy the database aswell, which was stored separately on the server. I’m now in a situation that I have all the files for the website, but when I try to load it, it gives an error that the connection to the database is failed.
Is it possible to recover or recreate the database somehow to get the website working? I’ve searched the internet but haven’t found anything useful on how to solve this. I’m not an expert, I thought I could just copy paste the website to a new provider
If it was not long before then you can contact your previous host to provide you a backup.
A good hosting company usually got their own policy backup that you can just request. Most of my hostings got vary opt, from everyday to everyweek backup. So when shit happens like when I forget to do it by myself, they always help me to restore it.
You can use the [wayback machine]) to gather the original text and images to rebuild the content.
Did you have any backup plugins installed that may have left a backup stored locally?