Can I reinstall WP with saved content

by humbledmarket Banned
9 replies
Hey Warriors,

So we had one of our shared hosting compromised. The hacker accessed several wordpress sites and inserted malware code. (They also added a bunch of casino links on each page)

I quickly contacted our host to get them to help scan and remove those codes. After doing so we went and remove each of those links and delete irrelevant pages.

Thinking that was the end of the matter we move forward but I notice the site kept getting flagged as adult content on certain internet security.

Finally it seems the person installed WPPM plugin which created a bunch of "male supplements" news site for unresolved pages. Got the host to remove this immediately.

-----
JUST TO BE SAFE, I would like to reinstall a fresh copy of wordpress although we don't want to lose the content or plugin info we already have

Is there anyway to reinstall WP backing up selective data like post, pages, and certain plugins - not all
-----

THANKS
#content #reinstall #saved
  • Profile picture of the author David V
    It sounds like they did more then just hack the WordPress core files.
    They entered info into the database so just replacing the WordPress core files will not get rid of anything in the database that may be an issue.

    You really will need to go through your database and make sure there are no problems in there before restoring it.

    You can certainly change the core files, but it won't matter if the database is still a problem.
    Yes you can selectively restore database table info BUT not with a couple button clicks.
    You will need to know what your doing in phpmyadmin or however you want to edit your database. If you don't, it may be worth paying an expert a few bucks to do it.

    It doesn't sound like you do backups, so I would highly recommend you do daily backups (or weekly) so recovering from a hack is very simple.
    {{ DiscussionBoard.errors[8167499].message }}
  • Profile picture of the author seasoned
    David is certainly right. As I recall, the plugins are in the same directory hierarchy, so you will likely have to reinstall them when you reinstall the code. In BOTH cases, the configurations may still revert to those in the database. But MOST of the data, and likely settings, ARE in the database, and that is ELSEWHERE. There is no simple way to clean THAT up unless you know what you are doing, or have enough experience to figure it out. ALSO, depending on the data, and the structure of the tables, it can take a while. Don't think he or she will have it done in a few minutes.

    Steve
    {{ DiscussionBoard.errors[8167812].message }}
  • Profile picture of the author humbledmarket
    Banned
    Thanks for all your input both of you! Really appreciate your help and advice.

    Will try to find some freelance developer to take a look and fix things up (if need be - as mentioned it looks like everything is running smoothly after our host took a look at things)
    {{ DiscussionBoard.errors[8168018].message }}
  • Profile picture of the author abhishekcis
    Originally Posted by humbledmarket View Post

    Hey Warriors,

    So we had one of our shared hosting compromised. The hacker accessed several wordpress sites and inserted malware code. (They also added a bunch of casino links on each page)

    I quickly contacted our host to get them to help scan and remove those codes. After doing so we went and remove each of those links and delete irrelevant pages.

    Thinking that was the end of the matter we move forward but I notice the site kept getting flagged as adult content on certain internet security.

    Finally it seems the person installed WPPM plugin which created a bunch of "male supplements" news site for unresolved pages. Got the host to remove this immediately.

    -----
    JUST TO BE SAFE, I would like to reinstall a fresh copy of wordpress although we don't want to lose the content or plugin info we already have

    Is there anyway to reinstall WP backing up selective data like post, pages, and certain plugins - not all
    -----

    THANKS
    Hey,

    You can do it by just taking a backup from the settings menu, then after you will require FTP access to delete existing WP installation & then you can install fresh wordpress files over there.

    Thanks & Regards
    Abhishek
    {{ DiscussionBoard.errors[8168109].message }}
  • Profile picture of the author dassad
    After a hack attack i strongly recommend to change your MySQL Username and MySQL Password (at least the password)

    Go to your Wordpress directory and open "wp-config.php"

    Check your MySQL Username in this line: define('DB_USER', 'YOURUSERNAME');

    Look for this line: define('DB_PASSWORD', 'YOURPASSWORD'); and copy your password.

    Go to your cPanel, open MySQL Databases, look for the user that you saw in teh first step and click change password.
    Enter your old password that you have just copied and the new password two times and save it

    Go back to your config file and change the password to the NEW that you have just saved and save your edits.

    Bene
    {{ DiscussionBoard.errors[8168355].message }}
    • Profile picture of the author williamrichard
      In admin panel, in tools menu export all the content and take a backup from the server. Then you can reinstall wordpress..
      {{ DiscussionBoard.errors[8168528].message }}
  • Profile picture of the author RobinInTexas
    Install Wordfence plugin, it will scan your files and data for unusual/bad/changed things daily and provide protection from and email notice of login attempts and a few more good things.

    No guarantees that it will find all the bad url's you still have to look manually, but it might point out some problem links.

    WordPress › Wordfence Security « WordPress Plugins
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[8168745].message }}
  • Profile picture of the author webwizdevelop
    According to me you should take backup of your database first and then reinstall the wp and you can then restore the database and onverwrite it
    {{ DiscussionBoard.errors[8174618].message }}

Trending Topics