WordPress.org

Forums

Website hacked & SQL database tables corrupt (6 posts)

  1. billingifc
    Member
    Posted 2 years ago #

    Hi,

    I'm new to this. First post on anything ever.

    I am non-technical, but used forums etc to develop my website: http://billingifc.com.au . It is a static site.

    I set it up in May this year (learning a great deal about HTML etc along the way). In mid-September, it got hacked by the Bangladesh Cyber Army. They changed my email and password so I couldn't log in to wp_login.php. After much angst and this forum, I discovered PHPmyadmin, and changed my email and password back. Then found a bit of code the hackers inserted, and removed it. (Basically, when you tried to go to a page like mysite/xxx where xxx didn't exist, it sent you to the hacker's message.) I was using the Squirrel theme, and had the following plugins activated:
    - XML sitemap generator
    - XYZ contact manager
    - Counterize

    Two weeks later, my website was hacked again by someone else. This time no page was accessible, as all showed a screen "you have been hacked by...." (I can't remember who). Again my email and password had been changed. I fixed it the same way, but then got very nervous about what code may have been inserted so I actually rebuilt my website from scratch!! This time I installed the sitemap generator and the contact manager only. (My host told me there was no problem on their end.). I also backed up my files using Filezilla, and my database into a .gz file.

    To weeks later (yesterday), I couldn't get on to the site again... and again couldn't access wp_login.php with my username and password. This time I couldn't do anything in PHPmyadmin at all - just got errors that the information in the tables was incorrect and the tables were corrupt. I followed forum advice to check all tables, then repair them. Every table was corrupt. No table was able to be repaired. I couldn't find any help on forums. My host told me everything was fine on their end. So again, I rebuilt my site from scratch. (I also couldn't find any help on how to restore the site from my backups). I haven't installed any plugins yet. Too scared!

    So my questions:
    1. Any idea why this is happening to me? Is it WordPress, Squirrel theme, my plugins, bad luck, other???
    2. Do you think yesterday's event (database tables corruption) was due to hacking, or bad luck or bad management?
    3. How do I stop it happening again? (i've read all the threads on securing WP sites... on my 2nd website, I did all the things I understood, but please bear in mind I'm a complete beginner at all of this!!)
    4. If it does happen again, how do I restore my website from my backups (I have cPanel and PHPmyadmin). Or perhaps, how should I back them up so they can be restored? I couldn't find anything which told me how to restore... and cPanel tells me that it will back everything up but it won't restore for me.

    Any help would be so greatly appreciated! Thanks

  2. esmi
    Forum Moderator
    Posted 2 years ago #

  3. billingifc
    Member
    Posted 2 years ago #

    Thank you so much for getting back to me!

    I've been through most of those resources previously, and have followed the advice my limited technical skills allow me to.

    I will have another go at doing it again.

    None of those resources (or any I've found) give me a Dummy's guide to restoring my website from my backups (both database and files). It makes sense to me that I should be able to restore my files using cPanel's File Manager... however I don't know how. It also seems sensible that I should be able to replace my PHPmyadmin database (which may have been hacked) with my backed up version. However I don't know how!

    Are you able to guess why I'm having such frequent problems? Is this usual for static WordPress sites run by amateurs?

    Thank you again!!

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    It makes sense to me that I should be able to restore my files using cPanel's File Manager

    You should really re-upload a fresh copy of WordPress.

    however I don't know how

    See Restoring_Your_Database_From_Backup.

    Are you able to guess why I'm having such frequent problems? Is this usual for static WordPress sites run by amateurs?

    If you didn't clean the site properly last time it was hacked, the hackers may well have walked right back in using back doors that still remained on your site.

  5. billingifc
    Member
    Posted 2 years ago #

    Thanks....

    ...so just to be clear, if I re-upload a fresh copy of WordPress (which I have done twice), I can't reuse the files that I've backed up?

    Yesterday,I found, and followed the link in your response above (restoring). It didn't work... after a long time uploading, I got an error message in phpMyAdmin that the files were incorrect. That was the point at which I simply started from scratch (for the 3rd time).

    I completely agree that if I didn't clean the site, the hackers can walk back in.... but my concern comes from the fact that I rebuilt the site from scratch (new WordPress installation, new everything), followed many of the security suggestions in your first post, and had my database tables crash within 2 weeks. Can you tell if the theme I'm using has holes, or the Plugins??

    Thanks!!

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    can't reuse the files that I've backed up?

    Why bother - especially as one or more of them could be infected. They do not store any data specific to your site.

    Can you tell if the theme I'm using has holes, or the Plugins??

    There's no way we can tell that from here.

Topic Closed

This topic has been closed to new replies.

About this Topic