Within the last month alone, I have had two clients who lost their entire website after a script kiddie exploited a security vulnerability in the CMS framework they were using. Since no data backup was made by either the clients or their hosts, the relatively simply task of restoring the data was out of the question. What should have taken a maximum of 20 minutes in turn took 6+ hours as, data needed to be manually typed up, templates needed to be configured to the client’s preference and required scripts needed to be installed. Depending on the complexity of the site, the time frame could have been significantly longer and costly. In this guide, I will go through the process of generating and restoring backups via Cpanel or the administrative panel of a CMS platform such as WordPress. Although this guide is aimed at novice & intermediate users, expert users can contribute by leaving additional tips in the comments section of the article.
Backups in cPanel:
cPanel is by far the most popular user panel in the hosting market as of today. Despite it’s large footprint, it provides unparalleled features enclosed in a user friendly environment that is easy to navigate around. If backup is enabled by your web host (it usually is), the process is as simple as clicking a couple of buttons and can save your MYSQL databases, files, and even email.
The process of backing up data:
- If your host uses cPanel, direct your browser to: http://www.your-domain-name.com/cPanel. You will be asked for a username and a password at this point and should enter the data corresponding to your hosting account (usually same user/pass as Ftp).
- Once successfully logged in, scroll down to the Files section and find Backup Wizard.
- At this point, you will be presented with the option of either restoring a previous backup or generating a new backup. At this point, we need to click on the backup button (I told you this was easy).
- Although it may be compelling to do so, do not click on the full backup button. This button is useful for users that have root access to the server and the resulting product cannot be restored via cPanel. The buttons we need to focus on are: Home Directory, MySQL databases, Email Forwarders & Filters. Click each button one by one and download the automatically generated tar.gz file. Personally, I have a USB thumbdrive dedicated to these files.
The process of restoring data:
- Instead of clicking the backup option in the cPanel wizard, click the restore option (no brains needed). If you followed the steps above, you should have three tar.gz archives. Simply upload each to their corresponding option and the wizard will take care of the rest.
Backups in WordPress:
If you are currently using the WordPress platform to run your website, data can be exported to your computer via plugins. The two add-on I currently use to generate copies of ravall.com are, WordPress Backup and WordPress Database Manager. The links attached explain the installation and configuration process quite nicely. As a person who consistently messes around with settings, these two scripts have saved my life a countless number of times. One thing to keep in mind is the fact that, WordPress stores posts, pages and other information through a MySQL database (usually called wordpress). Simply keeping a copy of the files but not the database will result in complete loss of data.
Manual Backup via phpMyadmin and FTP:
If you currently do not use plugin enabled content management systems such as Joomla or WordPress nor have a host that supports automatic backup generation then this section is for you.
Backing up data via FTP (very easy):
For most users reading this blog, the probability of possessing knowledge on the file transfer protocol (FTP) is quite high. For those unfamiliar with the transfer method, we have attached instructions below to copy files from the web server to a local directory. The same technique (reversed) can be used to easily upload files onto the remote server (seriously, using file managers is not efficient nor 1337).
- Using software such as SmartFTP or FileZilla, log into your FTP account and direct to the folder containing your website. For many hosts, this folder is typically named, “public_html.”
- Create an empty folder on your desktop and simply drag the files from the FTP window into the local folder. To restore/upload data, simply drag local files into the FTP window.
Backing up MySQL database via phpMyadmin:
- Click the export tab in the top navigation panel within phpMyadmin.
- You should be taken to a page with the title “View dump (schema) of databases“. Under the heading “Export,” there should be a list of databases currently on your server. Select the database you wish to backup.
- Make sure the “Save as file” check-box is ticked off and preferably compression is set to gzipped.
- Click the go button and save the generated file to a directory.
Restoring MySQL database via phpMyadmin:
- Extract the .sql file from the gzipped backup using any archiving software (Winrar).
- Open the .sql file using a text editor such as Notepad++. Near the top of the file, you should see the line: “Database: `information_schema`.” When restoring, this is the name of the database phpMyadmin will use. You may need to create a blank database with an identical name before restoring. Click on the newly created database via the navigation on the left hand side.
- Click the import tab in the top navigation panel within phpMyadmin.
- Using the browse button, locate the .sql file or the gzipped folder and press the Go button to initiate database restoration.
- You may receive errors if the database already exists and is populated with data (Drop tables to fix problem).
Following any one of the techniques discussed in this article can save your website when disaster strikes. It only takes a few minutes of your time and will prove to be valuable in the long run. At a personal level, I have forced my procrastinating self into performing weekly backups of ravall.com.












Comments:
You made some Good points there. I did a search on the topic and found most people will agree.
Excellent blog website, keep myself through checking it, I will be seriously serious to learn another recommendation of it.