How to Backup Your Website Using FTP and PHPMyAdmin

When was the last time you backed up your website?

Why You Need To Backup Your Website

Being a website owner for over two decades I’ve had first hand experience with losing data.  I’ve built websites for myself and others and the one lesson I learned and preach to this day is to backup your website often!

I can’t stress enough how important is to take regular backups of your website.  if you think about how much time and money you invest in your website then backing it up just makes sense right?  Being active in the hosting industry I’ve seen people get hacked or delete files accidentally and literally have no backups.  Imagine spending countless hour building your website or even paying someone to build it and have it gone in the blink of an eye.

How to backup your website manually using FTP

Step 1 – Before I review CodeGuard I’ll quickly explain how you can backup your own website manually.  First you will need FTP access.  If your hosting company uses cPanel then your cPanel username and password are your FTP credentials.

Step 2 –  Now that you have your FTP username and password you will need to download an FTP client which is just a program you install on your computer.  FileZilla is a free FTP client you can download here.  Once you open FileZilla, at the top it has fields for your hostname, username, password and port.

hostname = yourdomain.com
username:  your FTP usernamepassowrd:  your FTP password
port:  21

Hit the connect button and on the right side of the screen you’ll see a directory listing of your hosting server.

Step 3 – Click the public_html folder once (not double click) and drag it over to the left side of the screen which is your local computer.  Copy the entire public_html folder to a folder on your computer.  If you don’t see a folder called public_html then you’ll need to ask your host what your ‘root’ folder is and then copy that folder over.  Once you start copying you’ll see the progress at the bottom and it might take a while depending on how many files you have.

How to backup your database using PHPMyAdmin

If your site has a database then you will need to back that up as well.  For example if you use WordPress then you will have a database for sure.  To backup your database I’m going to assume your host uses PHPMyAdmin.

Step 1 – Login to your hosting control panel and click the PHPMyAdmin icon.

Step 2 – Click the database you want to backup on the left hand menu.

Step 3 – Click Export in the top navigation menu.

Step 4 – Under the Export heading, ensure that all of your tables are selected and that the SQL option is also selected.

Step 5 – Under the Options heading, make sure that you have selected: Add DROP TABLE / VIEW / PROCEDURE / FUNCTION

Step 6 – make sure that the Save as file option ( near the bottom of page) is checked. If you have a large database choose either “zipped” or “gzipped” to compress the file so it will be easier to download. If you choose none, you will be save the file without any compression which is perfectly fine.  You’ll end up with a .sql file.  I just prefer to compress it as it’s a small download and easier to upload if you ever need to restore it.

Step 7 – Click Go.  You will have the option to either open or save the database file.  Select the option to save the file and you can then choose the location on your computer where you want to store the database backup such as your desktop.

Backup often and store your backups locally

There you have it!  You just successfully backed up your website files and database.  Now this is just one step to being proactive and should be considered a crucial part of your website management.  As a website owner you’re responsible for maintaining a current backup of your website.  Don’t reply on your web host to save you. You’ll be surprised how many web hosts don’t backup your website or charge a fee.

There are paid options when it comes to remote backups but I’ll cover that in another post.  For now this guide is a simple way for you to backup your website and have the peace of mind in knowing you’re not left in the dark when something bad does happen.

 

Leave a Reply