0

My site was hacked (hadn't updated). I am unsuccessfully hunting for my last backup, but I do have a database dump. However, it appears the table names have changed from wp_ to wpen_

Is there a way I can bring the content from the database (SQL dump) that I do have into a new installation of WordPress?

  • 1
    You can change the database table prefix in the wp-config.php file. – Max Yudin Jan 21 '17 at 12:10
  • Hi, can you please tell us which version of wordpress was your hacked site? I have a website that i didn't update for a while, not sure if it has security problems. – Jack Johansson Jan 21 '17 at 13:10
  • 1
    You can replace the table prefix in the file before import. It's just text. – jgraup Jan 21 '17 at 20:56
0

The wp.config file in the root of an installation contains the database name, user, and password. You will need to adjust those values to match the backup database.

I would install a fresh copy of WP on your hosting site, after copying all files down to a new folder your local computer. Then, after the new WP install and basic setup, copy that new install down to your local computer (into another folder) for another backup. (Don't use those files unless you carefully inspect them for malware code.)

Then adjust the database name, user, password values in the new wp.config file to match the new database (you would have previously copied that old backup database to your host).

At that point, you should be able to log into the new install, with the backup database contents. Then start the long process of restoring content.

While you are doing that, consider adding backup to your site tasks. And keeping things updated. Lessons learned, and all that.

Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.