# Creating a Backup

## Why Create a backup?

It is important to regularly back up your website. In case something goes wrong with your website, you can easily revert back to an older version. Taking a backup only takes a few minutes, but can save you hours of re-making your website in the case of something unexpected happening with your website.

## Software Required

An FTP client is required so that you can save your website's files onto your computer or a hard drive. In this guide, FileZilla will be used. FileZilla is a free FTP client and is one of the most popular.

You can find download links to FileZilla and other free FTP clients in the CPanel.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FXkkkwg8EMVVPYEJ75NaF%2Fimage.png?alt=media&#x26;token=5017afb9-7f5c-4466-a722-fbb14cd102ae" alt=""><figcaption><p>Download links are available in the CPanel.</p></figcaption></figure>

{% hint style="info" %}
FileZilla is third-party software not owned, operated, or affiliated with Gilect. We strongly recommend you review their Privacy Policy.
{% endhint %}

## Backing up your files

Every website has files which you need to back up. While these files can be accessed by our Online File Manager, it is only possible to transfer files in bulk using and FTP Client, such as FileZilla.

### Connecting with an FTP Client

Launch your FTP Client of choice. FileZilla is being used in this example.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FNM6iSSM8k0OocwmQE1Mn%2Fimage.png?alt=media&#x26;token=a0c59c49-bbb8-493c-bd79-9eccbf64edad" alt=""><figcaption><p>Launch your FTP software</p></figcaption></figure>

Copy and paste the FTP information from the client area into the FTP client, as demonstrated in the below example. The Port is optional. Press the "Quick Connect" button after you finish filling out the login information.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FTWDWUaDCY9DRWxEdhf4W%2Fimage.png?alt=media&#x26;token=c20a10d9-0d36-4217-b003-d066f83c5322" alt=""><figcaption><p>Copy the files from the client area...</p></figcaption></figure>

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FUWvMgBLxQvwlNnRA3FKM%2Fimage.png?alt=media&#x26;token=b2f8c368-9bfb-4ad9-9603-c148ef97cd96" alt=""><figcaption><p>...Into the FTP Client</p></figcaption></figure>

If you get an "Unknown Certificate" popup, press the "OK" button. There is a valid certificate installed.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FRkzHjBzzo0zLEEP63TGk%2Fimage.png?alt=media&#x26;token=59e3c714-995f-4f5d-a231-ec0918f56c1e" alt=""><figcaption></figcaption></figure>

### Transferring the Files

Create a safe place on your drive to store your backed up files.

On the left pane of FileZilla, you can locate the location you want your website files to be saved to.

On the right pane of FileZilla, select the "htdocs" folder that you want to backup.

{% hint style="info" %}
Each of your domains have an "htdocs" folder. Your default domain (the one you signed up with) will be located in:

/htdocs/

Any other (sub)domain (such as addon domains or subdomains) will have their own folder. They will be located in:

/*domainname*/htdocs/
{% endhint %}

Drag the folder to the left pane of FileZilla, where it shows the location selected on your drive. The folder will be copied to that location on your computer.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FErT75HZ4OP55oOrLn902%2Fimage.png?alt=media&#x26;token=15e49516-f1fc-4973-9d7a-b30d4f6b66bc" alt=""><figcaption><p>Drag the folders to your drive</p></figcaption></figure>

{% hint style="info" %}
If you get disconnected or an error occurs, simply reconnect and try again.
{% endhint %}

{% hint style="success" %}
Congratulations! You backed up your files. You can proceed with the next step, backing up the database
{% endhint %}

## Backing up the database

Dynamic sites, such as those created with a CMS (WordPress, Joomla, Drupal, etc.) also contain databases which need to be backed up. Databases are different from your website's files and is needed for a dynamic website to function.

Not all websites are dynamic, however. If your website is static, meaning it only contains files. If you used the Website Builder, then your website is static. There is no need to back up a database, because there isn't any.

{% hint style="info" %}
If you are not sure if your website contains a database, or are not sure which database it is, you can check in Softaculous.

WordPress (and most other blogging CMSs) are *dynamic*.
{% endhint %}

### Open the database

Your databases can be accessed and downloaded via phpMyAdmin. You can access phpMyAdmin via the option in the CPanel.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2F6MXoN7XlGNkGfcOr5J16%2Fimage.png?alt=media&#x26;token=347bcde6-787b-45c0-bd5d-69af348506f5" alt=""><figcaption></figcaption></figure>

Select the database which you wish to connect to.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FEx3CvnMpSaZpXGS2A9UY%2Fimage.png?alt=media&#x26;token=a35ddfbb-c80d-4be6-8df0-5291ca5029d3" alt=""><figcaption><p>Select the database to connect to</p></figcaption></figure>

### Download the database

After you connected to phpMyAdmin, press the "Export" button in the top navbar.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FOjZqZqGkqosm156I3bRV%2Fimage.png?alt=media&#x26;token=586c3bc0-367d-4758-b802-5b3e0456cd17" alt=""><figcaption><p>Export button</p></figcaption></figure>

Confirm that all the details are correct, and press "Go" to begin downloading the database. Make sure you store the file in a safe place.

<figure><img src="https://1828264429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tuGRRNECKWyIODrHBVU%2Fuploads%2FaaPeEbLMniNtlQ3MUz7r%2Fimage.png?alt=media&#x26;token=c233a47f-5a5d-4c12-b9eb-40879fc418a8" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Your database is now backed up!
{% endhint %}

{% hint style="success" %}
Congratulations, your entire website was backed up! To restore a backup it, simply drag the htdocs folder back into the webserver, and import the database.
{% endhint %}
