How to Manually Backup Your Entire Website
Having an archived version of your website is a must in the event that your website is hacked, you accidentally delete critical files, or your host has a catastrophic server failure. Many hosting companies do provide complimentary backups, however, these backups become obsolete when something goes wrong at the host level, and many hosting contracts absolve companies of any liability in the event that something goes array – so don’t be fooled into thinking your data is safe.
Technology failures happen! This article is intended to help educate website owners on complicated technology issues by presenting the information in a way that is simple to understand and sharing a manual backup procedure that is easy to implement.
A good backup solution should fulfill two criteria:
1. Backups stored in more than one location – preferably on a desktop computer or external hard drive.
2. Backups created on a regular basis.
It is essential to keep a backup file stored locally (on a computer/external drive) and/or in the cloud (Dropbox, Google Drive, etc.). Why? Because backup files stored within the backend of your website serve no purpose if your server fails; those files would be gone along with the rest of your files. Your backup schedule should reflect the frequency with which you update your website. If you’re consistently publishing new content and have an active blog, you might consider weekly backups. If you don’t update things that frequently, you may be okay with monthly backups. At the very least, backups should be done every time there are major updates to the site whether that be updating your portfolio, pricing, pages, etc. If you would be frustrated having to recreate the newly added content in the event that your site unexpectedly failed, back it up.
A typical website consists of two parts:
1. The database that holds the website’s posts, pages, themes & plugin settings.
2. The actual files that make up your site, posts & pages.
You need both components to have a complete backup of your website in order to successfully restore it.
Issues with WordPress Backup Plugins
There are numerous plugins available through WordPress to assist in backing up your data, however it’s important to understand how the plugins actually work and not blindly accept the fact that you are protected. In addition, some plugins available backup your database, but not the actual files that make up the website. This is useless as the database is pointless without the actual files. In addition, some plugins backup your WordPress database & files, BUT if you have several databases, those are not backed up as they exist separate from WordPress. For example, when Machforms is installed on your site, it requires it’s own database and files which exist outside of WordPress and the same applies for many self hosted shopping cart systems. So while your WordPress data might be protected, there is still a significant risk of losing other valuable data by not understanding how a plugin works. Furthermore, many of the plugins available to assist with backups store the actual backup file on your backend, sometimes within the public html folder. This is a problem because if your server crashes, your public html folder no longer exists!
How to Manually Backup Your Site
You will need access to your hosting account cPanel (control panel).
PART 1: Backing up your database(s)
Login to your web host and navigate to the cPanel. Scroll down to Database Tools and choose phpMyAdmin. Depending on your hosting it may be located elsewhere. Upon phpMyAdmin opening, you’ll see a new page with a main administration panel. In the left column you’ll see your database(s) listed, from the right side choose the Export tab at the top of the page. Once the Export tab opens, under Export Method, select Custom. Under Databases, confirm ALL databases are selected. Under Output, change Compression to gzipped and verify SQL is selected under Format. Then scroll to the bottom and select Save and save the file to a location on your computer that you can find later.
That’s it, you’ve successfully backed up all your databases, not just the WordPress one. Now you need to back up your website files.
PART 2: Backing up your website files
Navigate back to the cPanel, scroll down to the Files section and click on File Manager. If a window pops up, choose “Home Directory” and make sure “show hidden files” is selected. Once the File Manager opens up, click on the “public_html” folder so it’s highlighted, but not opened. The public_html folder is home to all your WordPress files as well as any other files that you have hosted on your site. The file manager doesn’t allow you to download a folder directly, so you’ll need to compress the folder before downloading it to your computer. From the menu icons at the top choose Compress, select save as a gzip tar archive, and click compress files.
Once the folder has been compressed, a notification will pop up on your screen and you’ll see the “public_html.tar.gz” file in that same folder. If you have a very large site with a lot of files, this may take some time! Now that the folder is compressed, you need to download it your computer. Highlight the “public_html.tar.gz” file, choose Download from the icon menu at the top, and save it to the same location as your database file. Once you have verified that the file was successfully downloaded, you can delete the “public_html.tar.gz” from the File Manager by highlighting the file and choosing Delete from the icon menu.
NOTE: If you have a site that has a lot of folders & files or blog posts that date back several years, and the compression process above is taking quite some time, you can log in to an FTP program like Cyberduck or Filezilla and simply select your public_html folder and download it to your desktop. This is what I usually do and it’s much quicker for larger sites.
From here, navigate to your files on your computer. Create a new folder called “Your Website Backup – 06.28.2018” and drop both your database file and your public_html file in the folder. Store this backup folder in AT LEAST TWO PLACES. For every backup or major website overhaul, you will repeat the above process.
Now you have a backup that contains all your databases and all your files backed up and easily accessible should you ever need to restore your site!