Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How do I backup a website?


Hi, Leo. Although I don’t have a website, a cousin of mine has one dedicated
to the family genealogy on a free hosting site. They gave her all the
facilities she wanted to upload multiple gigabytes of thousands of files, but
the site kept crashing. When she berated them for the lack of advertised 24/7
support, they just wiped her site. My question is: is there a way to backup a
complete website of one’s own to a drive that will enable something like this
to be uploaded elsewhere? For example, another website? Could it be as simple
as copy and paste?

In this excerpt from
Answercast #79
, I look at various ways to backup a website so it can be
loaded to another hosting provider if needed.


Backing up a website?

Well, ultimately, the answer is maybe.

I want to start by describing a better approach to this entire problem – and it’s one that obviously I’m very familiar with since it’s what I do for all of the websites that I maintain.

Develop your website locally

I believe that it is very important that you not actually work on the website – on the website. By that I mean, I believe it’s an important approach to website design and maintenance, that you actually work on the files on your own PC. You edit your HTML, you deal with your images, you do whatever it is you do to your website while you are developing it (or when you are making changes to it) on a master copy that you keep on your PC.

Then, when you’re ready to actually make that live – you upload all of the files (or all of the files that have changed) to the actual web server.

That way, you actually have a master copy of everything on your PC. You can upload it to this server or that server or do whatever else you might want to do with it (including of course, keeping backup copies for your records.)

The website is automatically backed up

So, that is the best approach by far. I have to say, this is coming now after years and years of web development experience. That is the best approach, by far, to making sure that not only is your website backed up, but you have all of the information necessary to recreate it should your web host go away.

Again, I’ll underscore this by saying “in theory.” I’ve never (fortunately) had to test this out. “In theory,” I have on my laptop everything I need to recreate Ask Leo! from scratch on a new web host. All of the questions, all of the comments, all of the everything that I would need.

It would take some time (and some scrambling) to make it happen. But the idea is that I would not lose anything if my web server was completely destroyed – other than a couple of days to put it all back together somewhere else. That is a wonderful place to be in; that’s a sense of security that you really, really want to have.

So, if you aren’t there now (in other words you have a website on a web server and it’s currently only on that web server), then I strongly suggest you start backing it up and backing it up right now.

Backing up a website

There are two ways to do that.

One is to use the backup facilities provided by your web hosting company. This will vary dramatically based on what company you’re with; what services they provide.

Many of them will in fact provide a fairly robust backup solution that will allow you to (for example) keep the last five days of your website available as a backup should you need it. In addition to my own ability to recreate Ask Leo! from scratch, my web server is backed up nightly. That backup is kept for a minimum of a week. So I can, if something were to go wrong today, restore the server to an image that was taken yesterday.

Very much like taking an image backup of your PC. You’d be doing the same thing to your website.

But like I said, that depends dramatically on the facilities that are offered by your web hosting company.

FTP the files locally

The other approach (that should be completely within your control) is an FTP program. If you upload and download to your web server using FTP, then it’s very simple to get an FTP program going.

Use something like Filezilla or CuteFTP or several others. Open that up and yes, do a copy/paste from the FTP connection to your website down to your PC.

Now, depending on how big your site is (you indicated this one was multi-gigabytes) and how fast your internet connection is – that could take quite a bit of time.

That’s why the incremental solution of keeping everything on your PC to begin with and only uploading things as needed as they’ve changed, turns out to be a very effective and efficient way to keep your site backed up. You’re never having to download the whole thing all at once.

But if you’re not there, the best way (and in fact, the only way) to really get there and get what you know is a true backup of your site is to connect up with your FTP program and download the whole thing to a folder on your machine. Then back that up using your own PC’s backup programs.

(Transcript lightly edited for readability.)

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

3 comments on “How do I backup a website?”

  1. Thank you Leo, for a pretty comprehensive but easy to understand answer.

    I’m sure my cousin wil be happy to do just as you say.

    And thank you Connie for providing the link to this.

    Best regards for the season.

  2. Very good advice. Create and backup all your webpages, site map, files and folders on your personal computer as .html files for safe keeping. It’s a simple matter to upload your webpage files to another web hosting service. Web hosting services have a habit of going out of business (remember “Geocities”) but most will give you a warning and ample time to save or move your files.

  3. I’m becoming more and more aware of WordPress “sites” which keep all of their content in a database. I gather it’s not a simple matter to develop locally because the URL is baked in to the data in many places, so a search and replace is also needed to make everything work from a different location. Anyone have any simple solutions for this? A website I’m associated with (hosted under our control) has recently been “re-branded” and is now a WordPress site, so knowing what’s involved would be nice, because developers are not always around later on!

    The website URL is actually only in a couple of fields within the WordPress database so that’s actually an easy change. The problem are all the links embedded throughout the content that probably refer to that same URL. (If the references are of the form “http://domain/page” that’s a problem, if the references are just “/page”, that should just work by changing the site URL in WordPress.) If you’re changing your domain name the only solution I’m aware of (and have done) is to export the database to a flat text file (mysqldump will do it), search-and-replace to make the changes needed in a text editor, and then re-load the database.

    Specifically in the case of WordPress, I do the following: keep a backup of all the files installed on the site (i.e. the wordpress files, the plugins, themes, uploads and whatever else), and a periodic backup of the database (various ways, but mysqldump works well). Then I work on the site “live”. If there’s a problem reverting to a backup is pretty easy.

    This isn’t really unique to WordPress, but to many content management systems, including that used by Ask Leo!. Once again I keep a copy of all the static/non-database files, and a backup of the database.


Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.