rash Posted May 6, 2021 Share Posted May 6, 2021 Hi all, due to pure stupidity I managed to delete the complete root directory of a site without having a backup. [ short break to shake head, rofl etc. ] Luckily the database still exists and so do nearly 100 percent of the site directory. My first thought was to simply make a fresh install and change config.php data to use the existing database. Unfortunately the backend keeps me out and suspects whatever to be 'forged'. I guess it has to do with $config->userAuthSalt and/or $config->tableSalt. So is there any chance to connect a fresh install with an existing database? That would at least save me a few hours. Link to comment Share on other sites More sharing options...
netcarver Posted May 6, 2021 Share Posted May 6, 2021 Hi @rash You will need the salt from the original config file in order to allow existing users in the DB to log in with their current passwords. However, you can use the Recipe here for resetting an admin account password: https://processwire-recipes.com/recipes/resetting-admin-password-via-api/ That should, at least, let you log in as admin and use the interface. You might also try installing the ForgotPassword module in order to let other users reset their passwords. 2 Link to comment Share on other sites More sharing options...
rash Posted May 6, 2021 Author Share Posted May 6, 2021 Hi @netcarver, the combination of installation salt and password reset finally let me log in. The rest is easy though annoying work, but stupidity needs at least mild punishment. Thanks a lot for your help! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now