• About 40 hours since my Dreamhost hosted blog got hacked (TechSangam.com). Most of my PHP files were infected and some file permissions were also messed up — Dreamhost abuse team fixed that but it was clearly safer to start a clean WP install.

    I had 2 separate DB export files (one retrieved from Dreamhost’s backup process), the 2nd was an explicit “Export sql file” via phpMyadmin. Was using the 2nd one unsuccessfully until I realized that when I did a fresh Dreamhost “One Click” install, I had used the “existing db” as the option. Later Dreamhost forum post showed that it wouldn’t work — in the process an extra set of DB tables (with new prefixes) were created. After I realized this, I dropped those new DB tables, did a re-export and tried the import. Still didn’t work.

    Then I switched to using the export file from Dreamhost backup – which only had one set of db prefix tables. I created a brand new WP install at techsangam/com/wp2/
    Dreamhost’s One Click install creates a new database with the 11 WP tables. Add the my 20 imported tables from the backup (with a different prefix) – I have 31. Changing the DB_PREFIX to the imported tables. Loading up techsangam.com/wp2/ gives me a “Oops! This link appears to be broken”.

    Am in the process of getting the DEBUG_MODE working but any suggestions — will be HIGHLY appreciated.

    Thank you! THANK YOU all!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Just import the database download same version you were using when your when your site hacked extract it and upload it on your server then open your wordpress url and install it with your imported database details it will update the database.

    Hope it works

    Thread Starter ulaar

    (@ulaar)

    Thanks Elan for your quick response. I tried various versions of what you suggested — but it didn’t work. What finally worked for me is the following:
    1. I did a Dreamhost “One Click install” – which creates a new WordPress database with a fresh set of 11 tables.
    2. I split the import SQL file into separate files (users & usermeta, posts and postmeta, comments & commentmeta, etc.).
    3. Deleted the default set of records from users and usermeta tables, followed by import of the user & usermeta records (from old db) and so on… for the remaining tables.
    4. I skipped the “options” table because in an earlier iteration, that messed up my WP dashboard & install completely.

    Anyway, I’m almost there except that I have a whole bunch of umlaut characters — inserted in the “posts” and “comments” tables (most of the posts unfortunately). For example, look at this:
    http://www.techsangam.com/2011/09/21/elitist-school-systems-teachers-with-high-ambition-parents-with-low-expectations/

    I used the “Search and Replace” plugin to determine how widespread one of those characters (Â) is — and it’s HIGHLY widespread. Problem is that this plugin is also matching the regular “a” character — so obviously I can’t use it. Any reliable way of doing mass search-and-replace for these special characters?

    Thanks,.
    Vishy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Recovering from hacking – import from old db to new installation not working’ is closed to new replies.