• Resolved portia79

    (@portia79)


    My webhosting account has been hacked into and an index.php file was overwritten with some rubbish. The hosting company has deactivated my account, ran a scan and produced a list of files being ‘infected’. I had to remove them (2 files: index.php and wp-system.php from the root directory).
    The database has remained intact. After I removed the infected files they scanned it again and reactivated the account.

    I’ve google that for index.php I can just download the latest wordpress package and replace the index.php file. I can’t seem to find anything on wp-system and it does not seem to exist in a downloaded new package.

    If I try to access the domain, the list of files/directories gets listed. If I want to access domain.com/wp-admin I get:

    The requested URL /index.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Please note index.php exists with 644 permissions.

    wp-system.php does not exist any more. Not sure how to replace it.
    Please advise.

    • This topic was modified 6 years, 11 months ago by portia79.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Sometime hacked site can leave you chasing a ghost when you try to delete what are know infected files. Often when I go thru this and cannot restore the files I would end up deleting the entire wordpress files/folders but not deleting the database since it is intact. I usually keep a good backup of important files such as themes, images, css, etc.

    Now this might not be ideal for you depending how you got things set up and what plugins, themes and customization you may have done. So you might want to walk thru the steps in the following link:

    I’ve been hacked!

    Thread Starter portia79

    (@portia79)

    Thanks – I’m not that concerned with customisations or themes as long as the content of the posts is retrieved. Can you just confirm so should I just take a note of the database credentials from the config file and delete all the folders from the installation directory. Then I should start with a fresh installation (from the hosting provider install scripts). Will there be an option to restore the content from a database?

    I personally don’t care for the host provided installer script. Besides, you don’t have to go thru that.

    First, I would go ahead and make a backup of the entire wordpress files and download it to your desktop use FTP like Fizezilla or CuteFTP. It would not hurt to make a backup copy of your database via host control panel.

    Next, delete the blog from the hosted site BUT leave a copy of wp-cofig.php there.

    Now go download a fresh copy of the latest WordPress and upload it to your hosted site.

    That’s about it. You should be able to see the site and login to admin. It may require a db update if your old blog was not up to date.

    I hope this helps.

    Thread Starter portia79

    (@portia79)

    OK. Thanks. Will do it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Restore files’ is closed to new replies.