Using phpMyAdmin to restore content

Back in March 2014 my website was hacked. It took a little over a month but it’s finally up and running again. Thanks to being able to restore my content using phpMyAdmin.

phpMyAdmin logo

Using phpMyAdmin to restore content

Depending on how your content was lost you may be unable to access your content management system (CMS), CPanel or FTP server. This was the case for me – the hackers had deleted everything including my WordPress installation which is my CMS of choice.

If this is the case you will need to ask your web host to add a copy of your WordPress database to MySQL in your CPanel. Once this has been done you will also need to ask them for a fresh WordPress installation.

Using phpMyAdmin you can export your previous WordPress database (for both posts and comments) on to your computer. Then import these into your new WordPress database installation.

Having done so, you should now see your old posts and pages in your new WordPress database in phpMyAdmin. Unfortunately this does not restore your hierarchy, i.e. categories and tags, so you will need to go through each post and add these. Time consuming yes, but better than having to start your entire website from scratch! 🙂

One thing I noticed is the comments are no longer assigned to posts and without reading each comment individually, there was nothing to indicate which post they belonged to. So I haven’t added my comments back.

If anyone with experience using phpMYAdmin, has an easier way to add my comments to the new database – please share! Thanks. 😊

One thing I did like is all my drafts were saved – so I have some new blog posts coming soon.

Tips to keep the hackers at bay.

  1. Have a strong password, ideally 8 or more characters with a mixture of upper and lower case, numbers and symbols.
  2. Install the ‘limit login attempts‘ plugin for WordPress.
  3. Keep WordPress themes, plugins, and core up to date.

I hope this helps anyone in a similar situation! It’s very disheartening to put so much work into your website to wake up and find it’s disappeared!

Besides trying to get my website back up and running, I have been spending A LOT (too much?) of my online time on Pinterest! 😉

2 thoughts on “Using phpMyAdmin to restore content

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge