Jump to content

[Solved] Reconstruct PW site when server data is lost?


Recommended Posts

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 post
Share on other sites

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.

  • Like 2
Link to post
Share on other sites

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!

  • Like 2
Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...