Support » Installing WordPress » Rebuilding afresh using existing database

  • Resolved jacarandinha


    I have always kept up with the latest version of WordPress, but somehow somebody hacked into my site and infected it with a spamming PHP script that caused my hosting provider to suspend my account. It took them two days to fix the issue but the key thing is, I have to install WP afresh, as I don’t know what PHP that they have changed.

    So I want to rebuild my blog – I have backed up my database and saved it in my harddrive. I have also downloaded every file from my old site, including all of the old PHPs and themes.

    My question is – is it as easy as reinstalling WP, changing the wp-config.php to point to the old database, and then reinstate the old theme?

    Apologies to any grumpy experts 🙂 I have searched around and the existing questions / explanations seem to be slightly different to what I’m after.

    Any tips/advice would be much appreciated – as well as on how to safeguard my blog against any future incursions! AARGH!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, I’d be happy to help you… are you familiar with FTP at all? If not download filezilla and I’ll walk you through the basics…

    Ok, so if you have all the old files an database here is what you need to do:
    1.) login to filezilla and take the old files you have and upload them to public_html >

    2.) go to your file manager, and go to public_html > > oldsitefiles, move all the old site files into public_html >

    3.) Create a new database, create a new user, sync the new user to the new database, allow all priveledges

    4) Go into phpmyadmin, look on the left side for the new database name you created. Double click it, and then go to import, then select your old database backup (that was on your desktop computer)

    5) Make sure it uploaded correctly, then go into public_html > > wp-config.php and edit in all the new database name, user, and password

    6.) Login to wordpres admin using your old details and everything should be good to go!

    *** If you have any problems with the article links being 404 errors, go into settings > permalinks > custom, change it to either /%category%/%postname%/ or /%postname%/

    Everything should be back to normal for you now!

    Thank you, Zybrite — all set now! Thank you for giving me the rough steps. I manage to get the details through the net – thank God I didn’t just link to my old database but create a new one and then import the contents over 🙂

    Thank you for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rebuilding afresh using existing database’ is closed to new replies.