As some of you may already know, my site is a self-hosted WordPress site. This means that I use a hosting service, DreamHost, to upload and install the WordPress package. Hosting your own website, instead of using WordPress’ free service, comes with a lot of advantages and customization capability. One of which is the ability to install any plug-ins you want, including ones that help you back up your data.
It goes without saying that when dealing with computer technology in general, it’s always good to have at least one method of backing up your data, in case there’s anything that goes wrong. I cannot stress how critical it is to have this mechanism in place, for it has saved me from complete disaster more than a few times. Today, I’ll talk about what I do/use to back my site up. Please note that this article is for intermediate computer users; step-by-step instructions will not be provided, but encouraged to be explored on your own instead.
First, let’s talk about database. WordPress uses a MySQL database to manage your settings and post entries. If you have DreamHost, they offer a once-a-month-only backup service, which is nice. Although, chances are, you already have quite a few entries within a week, on top of the usual updates and tweaking, so this might not fly. What I use is a plug-in called WP-DBManager. Here are a few things it supports:
Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up and optimizing of database.
As you can see, WP-DBManager plug-in comes with a lot of useful tools. It’s pretty much also a “set and forget” tool. Once you’ve set it up, you don’t have to touch it ever again. Mine’s set up for a weekly back up, and biweekly database optimization. What’s nice is that you can have the backups zipped and emailed to you. I, however, turned this feature off, as I have the backups stored on one of my DreamHost directories. There’s no need to flood my inbox with these zips.
Besides backing up your database, we need to be able to back up your actually files as well. These files could be your theme, music, pictures, media, or even scripts. To accomplish this, I have a few things in place to make it work. Here’s my method:
DreamHost comes with a feature called sub-domain mirroring. What that means is you can set up a sub-domain and set it to mirror the main site. Now this doesn’t actually copy the files, but it helps to make your life easier. In my case, I use cdn.tambnguyen.com (more on this later).
What you really need is a plug called W3 Total Cache. I understand there are a lot of caching plug-ins for WordPress, and there’s always a question of which one is better than the rest. I’ve found W3 Total Cache to be the best one to work with. The settings for this plug-in can be quite confusing at the beginning, but you should be able to figure out what setting works best for your site after a few hours. Since the scope of this article is about backing up your file, I’ll go ahead and skip to the CDN (Content Delivery Network) setup part. What is CDN? Here’s the short definition:
A content delivery network or content distribution network (CDN) is a system of computers containing copies of data, placed at various points in a network so as to maximize bandwidth for access to the data from clients throughout the network. A client accesses a copy of the data near to the client, as opposed to all clients accessing the same central server, so as to avoid bottlenecks near that server.
Content types include web objects, downloadable objects (media files, software, documents), applications, real time media streams, and other components of internet delivery (DNS, routes, and database queries).
We’ll use this feature of W3 Total Cache plug-in to set up our backup system. Within this option, there’s an area for you to specify a FTP server to upload your media files to. Your hosting service should have given you access to this. All you have to do is fill out the FTP connection information, and everything is a go. With DreamHost’s site mirroring, you can upload straight to a directory, and then tell W3 Total Cache to mirror your site (again, cdn.tambnguyen.com for my case).
I’ve set this up so that all my theme files, includes files, gallery and pictures are uploaded to the CDN server every day (86400 seconds). This means that I always have one and one only set of differential backup, updated daily. In the case of disaster, I can always go to this directory and retrieve the good files back.
It is significant for any and every photographer to have a blog. A blog is a tool for the photographer to show his/her clients about personality, style, gallery, contact info, etc… The last thing you want to do is to spend too much time taking care of your blogging site and not take any photo. With a backup mechanism in place, it should give you more confidence on the “dotcom” side, thus more time for the artistic side.
There you have it; this is what I use to back up my website. If you have any comments, questions, thoughts or ideas, please feel free to drop me a line.
Happy blogging. And shooting.