How to Beat the Hackers - Simple Steps to Protect and Restore Your Site

by sbucciarel Banned 43 replies
There's a lot of "my sites were hacked" lately. There's a very simple way to instantly restore your sites without buying any plugins or progams.

This is for cpanel hosting.

Backup Your Site Files
Go to your cpanel.
Click on File Manager.
Choose your domain
Click "Select All" files
Choose Compress
Check zip for file format and name your file
Click go

That's it - your files are now backed up and all you do to restore them is go to file manager, click on the zip file you created and choose Extract. It will overwrite all the files there, restoring them to their normal state.

Backup Your Database

If your site has a database, as Wordpress sites do, the final step is to backup your database.

Go to cpanel
Click on phpMyAdmin
Click on the database you want to back up
Click on Export
Click go
Save it to a folder for your site on your hard drive
That's it!

To restore your database, go to phpMyAdmin in your cpanel.
Click on your database
Select all the tables and Choose "Drop" from the dropdown box.
Then click on "Import"
Import the database that you saved to your hard drive
That's it.

That's all there is to it and it only takes about 5 minutes or less.
#main internet marketing discussion forum #beat #hackers #protect #restore #simple #site #steps
Avatar of Unregistered
  • Profile picture of the author Bentley74
    Great advice, Suzanne!
    I'm embarrassed to admit that I didn't even know about the File manager "all files" compression/backup approach. Cool! (and easy)

    For that matter, I've never even backed up a database the way you described (usually just use some form of DB backup plugin).

    Thanks for sharing!
  • Profile picture of the author Andyhenry
    Yep - this is easy to do.

    I've been telling people this for ages. It comes up when people ask about backing up and cloning blogs, and although it's really quick and simple - people seem to still prefer to pay for a tool to do it instead.

    Hopefully a few people will read the OP and actually give it a try just so they know how easy it is.


    nothing to see here.

  • Profile picture of the author smartyjohn
    I didn't think that there is any option to select all and Compress it in cPanel I will surely try it tonight as I do back-up my file manually. thanks for the help.
  • Profile picture of the author WikiWarrior
    Thanks Suzanne, I didn't realise it was that easy. One of those things I keep putting off but seeing it laid out like that there's really no excuse for not getting it done.
  • Profile picture of the author Jim Willis
    • Profile picture of the author sbucciarel
      Originally Posted by Jim Willis View Post

      I never knew you could just zip all the files and reup them. Is it easy to get it all to work on another server?
      Absolutely. If it's a Wordpress site, you have the Wordpress file as well as the theme files and images, etc. all zipped up. Just upload it to any host, unzip or "Extract" the file, create your database and import the database you saved, edit the wp-config file with the new database info and finally, go into the new database in wp-options and change the url to the new url. You now have an identical site on a different url. You'll have to go into your Wordpress control panel and go to Settings > General > and place your new url in the second box in there.

      Running the plugin Search and Replace will change all the old urls in the posts and images to the new urls.

      All those steps are in a document I created to help people transfer a site from one host to another. It's at
  • Profile picture of the author luckystepho
    Thanks Suzanne, I'm another one that had been putting off thinking about it and hadn't realised it was that easy. This information could potentially save hours and hours of time not to mention lost revenue!
    • Profile picture of the author Shaun OReilly
      Another thing you can do to make your WordPress installation
      more secure, it to change the table prefix for your WordPress

      By default, the table prefix is 'wp_'

      It is recommended that you change the 'wp' to something else.

      Export your current WordPress database and then open it up
      in Notepad and then do a Find and Replace (Ctrl +H) to change
      all of the prefixes from 'wp_' to 'xxx_' (replace xxx with whatever
      letters you choose).

      Then drop the database and import the new database with the
      new table prefix.

      You'll need to update the table prefix in your wp-config.php file
      too. Just do a search for the line in the code that has...

        = 'wp_';
      Then change it to whatever letters you've chosen.

      Dedicated to mutual success,



  • Profile picture of the author ericbryant
    Have you heard about wptwin from Jason Fladlein? It is well, unreal. Instant backups and transfers.
    - Social Media Marketing Strategy & Consulting

    - Custom Wordpress Website Design & Blogs

    - Wordpress Speed Demon? Click Here!

    - Live the life you love... now!
    • Profile picture of the author sbucciarel
      Originally Posted by ericbryant View Post

      Have you heard about wptwin from Jason Fladlein? It is well, unreal. Instant backups and transfers.
      Yeah actually, I bought it when it was first released. Tried it on one site, it failed and never touched it again. It literally takes me two minutes to backup and transfer a site without software.
  • Profile picture of the author bhola badshah
    you can also download the backups from cpanel under backup section if you have daily backups provided by your hosting company.
  • Profile picture of the author waynewalters
    That is great info, Suzanne. Thanks for sharing.

    Is there any merit to not using Fantastico or Quick Install when adding Wordpress to your site for security purposes? I recently saw a video series on a more secure way to install Wordpress. I'm not tech savvy enough to know what the security risks are when using Fantastico versus the long way of installing Wordpress.

    Skateboarding every damn day

  • Profile picture of the author timpears
    My problem with messing with data bases is, how do you figure out which data base goes with which domain?

    Tim Pears

Trending Topics