Jump to content

Recover pw with database?


Brmm
 Share

Recommended Posts

Hello,

I use processwire as a CMS which generates a json file in php. The json.php URL is loaded each time the iPad app starts up, so having a controllable backend.

But I've lost my website and don't have a backup of the files, the only thing I have is the mysql database and the (only) json.php file. So basicly I have everything except processwire and the images that were uploaded...

Is it possible to recover my website? whats the best practice?

Thank you!

Link to comment
Share on other sites

Well, you need a backup of your files. At least from the /site/ folder, because all files (template, images etc.) are inside.

Don't you have one?

Thats the thing I dont have, I only use one php attached to a template and I've lost some images, the rest is data.

Aren't the templates and fields saved in the database?

Link to comment
Share on other sites

Sorry I didn't read carefully.

Yes, the fields and their data are stored in the database. Also the templates, but not their content, that's in the template file itself (/site/templates/).

Do you know which version you had installed?

Download the same version of processwire. Delete the install.php file.

In the site/config.php set the correct settings pointing to your existing mysql database.

Try to log into your admin, I think it should work.

Link to comment
Share on other sites

Sorry I didn't read carefully.

Yes, the fields and their data are stored in the database. Also the templates, but not their content, that's in the template file itself (/site/templates/).

Do you know which version you had installed?

Download the same version of processwire. Delete the install.php file.

In the site/config.php set the correct settings pointing to your existing mysql database.

Try to log into your admin, I think it should work.

Thanks! I will try that now, hope it works.

Link to comment
Share on other sites

I think only thing that is lost datawise are user passwords, since they have salt in filesystem. All code are lost of course, but data should be fine. First: take backups of your current database to prevent further catastrophem

Link to comment
Share on other sites

Well, template files, css, and js are lost too unfortunately... you have the content but not the code. Maybe you can recover the raw html, the css and javascript if the site was cached by google. If so, you just have to rewrite the php with base on the html.

Link to comment
Share on other sites

It worked!

I uploaded a new processwire, finished the installation and changed it to my old database in the config.php

Just had to reset all users password for some reason.

Thing worked on first refresh, amazing. I only lost a couple of images which were uploaded content, but it's recoverable.

Thanks again!

  • Like 1
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...