How to Create a Backup of Your phpFox Website
Written by Stephanie Brown Wednesday, 19 September 2012
This article will focus on the steps you need to take to successfully and completely create a backup of your phpFox site.
Knowing how to create a successful backup of your phpFox website is a very important and necessary skill. I suggest that before you make any changes to your website, you create a full and complete backup.
There are a handful of ways that you can backup your website, this article will focus on the one that I believe is the quickest and most comprehensive backup option. There are three main “parts” of your website that you will want to backup: the database, the member uploaded files, and your actual site files/directories themselves.
Backing up your Database with phpMyAdmin
Your database is the heart of your website. When your website has a large amount of daily activity, you should create a database backup on a daily basis. Until then, depending on the amount of activity on your website, you should be fine with a backup every few days or weekly.
Login to your cPanel and scroll down to the Database section. Select phpMyAdmin.
The left column of the phpMyAdmin screen will show a list of your databases. Click on the database that you want to backup, for the purposes of this article, I will backup the liphpfox_fox database.
After selecting your database, a list of the tables of that database will load into the right side of the screen. Above the table list, there is a menu, click Export.
On the next screen, you are given the option for a quick or custom export, as well as the format for your backup. The default settings are fine for doing a regular backup.
Once you are comfortable with your export method and format choices, click Go.
Select Save on the window that pops up.
When the Save As dialog opens, you will be able to choose a name for your backup and where to store the backup file. I suggest putting the date in the name of your backup.
The actual database backup can take just a few minutes, or a couple of hours, depending on the amount of data that is in the database.
Once you have your database backed up, we can move on to the next step.
Backing up your File directory
All of your site’s photos, videos, and other media files are kept by default, in the File directory. You will need to create a backup of this directory everytime you create a backup of the database.
Login to your cPanel and scroll down to the Files section. Select File Manager.
In the File Manager screen, left click anywhere on the row for the file folder to select that folder. Select the Compress option on the Menu bar. (Note that on my screenshot it is Compr…)
On the Compress popup window, select GZiped Tar Archive. I suggest using GZiped Tar because this will not only use a higher compression rate than Zip, it will also save your file and directory permissions! Select Compress File(s).
The compressed file should now be visible in the file manager as file.tar.gz. Right click anywhere on the row for this file and select Download to download this file to your computer. I suggest saving it in the same directory, and with the same date in the name as the database backup you did in the previous section.
The File directory, and your site’s database, are both updated regularly when your members and you are active on your website. These two items need to be backed up often and regularly, so that there is less potential for loss of your member’s data.
Backing up your site’s design, layout, features and other static content
You should perform a backup of all the files and directories that are not a part of the File directory, as well as your database and the File directory, before you make any changes to your website. A change to your website can be anything as simple as changing settings in the admincp, or as complex as installation of a new theme or addon.
In your cPanel File Manger, select all files and directories except the File directory. You can do this by using Ctrl while left clicking the files and directories you want to add in this backup. Once you have all the files and directories selected, click Compress in the menu.
Follow the same procedure as you did when creating a backup of your File directory above. You will want to save this backup to the same folder on your computer as you have saved your database and File directory backups. I suggest putting a date in the name of this file as well as some name to distinguish this from the File folder backup.
It is important that you make regular backups of your File folder and Database, to preserve your member’s data and files. Your site files only need to be backed up before you make changes and after you are happy with the changes you have made. You will want a site files backup that is a copy of your current functioning website.
Congratulations! You have just learned how to easily and completely create backups for your phpFox website!