To back up a website to your computer, you need two things: a copy of the site's files, downloaded over FTP or SFTP, and an export of its database, usually a MySQL dump made with phpMyAdmin or mysqldump. Save both in a dated folder on your PC, and repeat on a schedule. Doing it by hand works, but it is easy to forget, so the reliable approach is a backup tool that downloads the files and database for you every night.
This guide explains what you need to copy, how to do it manually, how to automate it, and how to make sure the backup is complete enough to restore.
Why keep your own copy?
Most hosts run backups, and those are worth having. But they live with the same company as your site. If your account is suspended over a billing problem, the server is compromised, the host shuts down, or their backups only go back a few days, you can lose the site and the backups together.
A copy on your own computer is independent. It is also handy for everyday problems: a plugin update that breaks the layout, a page someone deleted, or a hack you only notice a week later.
What you need to back up
| Part | What it contains | How to copy it |
|---|---|---|
| Site files | Code, themes, plugins, images and uploads, configuration files such as wp-config.php or .htaccess | FTP or SFTP download, or the host's file manager |
| Database | Posts, pages, products, orders, users, comments and settings for most CMS sites | phpMyAdmin export or mysqldump |
| Email (if hosted) | Mailboxes on the hosting account | Your email client or the host's tools |
For a WordPress, Joomla or Drupal site, you need both the files and the database. Files alone give you an empty theme; the database alone has no images or plugins. A static HTML site has no database, so the files are enough.
Back it up by hand
Method 1: download the files over FTP or SFTP
- Find your FTP or SFTP details in your hosting control panel: host name, username, password and port. SFTP (usually port 22) is encrypted and is the better choice if your host supports it.
- Open an FTP client and connect.
- Navigate to your site's folder, often
public_html,wwworhtdocs. - Create a dated folder on your PC, such as
Backups\mysite\2026-10-05\files. - Download the whole site folder into it. Make sure hidden files like
.htaccessare included; some clients hide them by default.
The first download can take a while for a site with thousands of images. Later downloads take just as long unless your tool only fetches changed files.
Method 2: export the database
Using phpMyAdmin, which most cPanel and Plesk hosts include:
- Open phpMyAdmin from your hosting control panel.
- Select your site's database in the left column. If you are not sure which one, check the database name in your CMS configuration file (for WordPress,
DB_NAMEin wp-config.php). - Click the Export tab, choose Quick and format SQL, then click Export (labeled Go in older versions).
- Save the .sql file into the same dated folder, such as
Backups\mysite\2026-10-05\database.
If you have SSH access, mysqldump is faster and more reliable for larger databases. Our guide to automatically backing up a MySQL database covers the commands and options.
Method 3: use your host's backup download
On cPanel hosting, the Backup or Backup Wizard page lets you download a home directory backup and individual database backups as compressed files. That is a quick way to take a one-off copy. You still have to remember to do it, and full account backups are usually only restorable by the host. See how to automate cPanel backups for ways around this.
Automate it so it actually happens
Manual backups have a habit of stopping after the first few weeks. Automating them means the copy you need is there when something goes wrong.
Rocket Backups can back up website files over FTP or SFTP and your MySQL databases on a schedule, straight to your own drive. You enter your hosting connection details once, choose the folders and database, pick a time, and every night a fresh copy lands on your PC, USB drive or NAS. Because backups are incremental, only files that changed are copied after the first run, and you keep as many dated versions as you like.
Website backups sit alongside your PC backups in the same program, so the same features apply: email alerts if a job fails, verification after each run, and optional AES-256 encryption, which is worth turning on because website backups include database passwords and customer data.
Check your backup is restorable
A website backup is only useful if it contains everything you need to rebuild the site. After your first backup, check:
- The files folder includes your configuration file, uploads folder and any custom code.
- The .sql file is not empty and ends normally. Open it in a text editor; you should see CREATE TABLE and INSERT statements.
- The database backup and files backup are from the same night, so they match.
For a real test, restore to a local web server or a staging subdomain. Import the .sql file into an empty database, upload the files, update the database settings in the configuration file, and see if the site loads.
Keep website backups secure
A website backup is a sensitive file. The configuration file holds your database password, and the database itself may contain customer names, email addresses, orders and password hashes. Treat the backup folder with the same care as the live site:
- Encrypt it. If the backup drive is lost or a shared PC is accessed by someone else, encryption keeps the contents private.
- Never leave backups in the public web folder. A .zip or .sql file in
public_htmlcan be downloaded by anyone who guesses its name. - Use SFTP rather than plain FTP where your host allows it, so passwords and files are not sent unencrypted.
- Keep a second copy. With Rocket Backups you can send the same website backup to two places, such as your PC's drive and a NAS, so one failed drive does not leave you without a copy.
If you manage sites for clients, check your agreement covers where you keep their data, and keep each client's backups in a separate folder so restores are quick and nothing gets mixed up.
How often and how long to keep
- Busy sites such as stores, membership sites and blogs with comments: back up daily and keep at least 30 days.
- Small brochure sites that rarely change: weekly is usually fine, plus a backup before any update.
- Before updates: always take a backup before updating the CMS, theme or plugins.
Keeping a month or more of history matters because hacks are often noticed late. If malicious code was added two weeks ago, you need a backup from before that. Our guide to restoring a website after a hack explains how to choose the right one.
Frequently asked questions
Is my web host's backup enough?
It is useful, but it lives on the same company's systems as your site. If your account is suspended, hacked or the host has a problem, you may lose the site and the backups together.
What parts of a website do I need to back up?
The files (themes, plugins, uploads and configuration) and the database, which holds posts, pages, users and settings for most CMS sites. You need both to restore.
How often should I back up my website?
Daily for sites that change often, such as stores, blogs with comments or membership sites. Weekly can be enough for a small brochure site that rarely changes.
