Knowledge Base
How to backup multiple websites on different cPanel accounts
Overview
By the end of this article, you will be able to add websites from several different cPanel accounts on the same Virtual Private Server (VPS) or dedicated server to CodeGuard. It walks through four phases: opening Web Host Manager (WHM) to reach each cPanel account, locating the SSH File Transfer Protocol (SFTP) credentials, finding each website's Uniform Resource Locator (URL) and file content path, and adding the website to CodeGuard.
Before you start
• Root-level access to Web Host Manager (WHM) on your server
• A CodeGuard account
• The SFTP credentials and document root path for each website you want to back up
Step 1: Open Web Host Manager and select the target cPanel account
First, access WHM as the root user and open the 'Account Information' page.
Then select 'List Accounts' to display all of the cPanel accounts on this server
From this list, locate the cPanel account that contains the website you would like to add to CodeGuard. Then click on the cPanel logo in the 'cPanel' column on the corresponding row to access the cPanel interface for that account.
Figure 1: WHM account list showing the cPanel account selection option.
After logging in to cPanel, we will locate the following information so that we can add your websites to CodeGuard.
Figure 2: WHM account list showing the cPanel account selection option.
Step 2: Find the SFTP credentials for that cPanel account
By default, the cPanel username and password can be used to connect via SFTP. If you already have the information required to log into the cPanel account directly, as illustrated below. You can use this information for CodeGuard access.
Figure 3: cPanel login details used as SFTP credentials for CodeGuard.
Step 3: Find the website URL and file content path in cPanel
From the cPanel home page, click 'Subdomains' under the 'Domains' section of your cPanel. Figure 4: Subdomains page showing website URLs and document root paths.
You might have several subdomains under your main domain. Take note of the URL that you wish to backup with CodeGuard. If the website you are adding is your main domain, it will be listed under 'Domain' in the 'Create a Subdomain' section. If it is a subdomain you are adding, they will all be listed in the section titled 'Modify a Subdomain'.
If you are adding a subdomain, also take note of the file content path listed here as the "Document Root" for your site.
If you are adding your primary domain, you can use /public_html as your file content path, but you will need to take note of all of the paths for your subdomains. Each subdomain should be added as a separate website backup and their paths will need to be excluded from the primary domain's backup during the activation process described below. Figure 5: Subdomains page showing website URLs and document root paths.
Step 4: Add the website to CodeGuard using its SFTP credentials
Go to www.codeguard.com/login and sign in to your CodeGuard account, then click Add Website.
Depending on whether you have already added a website to your CodeGuard account, this may appear highlighted after login:
After selecting either option, you will be taken to the connect page. Here you will need to enter the credentials that you previously found. Be sure to select 'SFTP'. Click 'Test Website Connection' once you have entered your credentials.
When you see the success message, choose 'Connect Your Website'.
Next, select the File Content Path that you identified previously. For the primary domain in your account, this will be /public_html.
Next, choose which files you would like to include in the backup. If you would like to select all files, simply click the first checkbox, and everything below it will be included.
Note: When adding your primary domain with the path /public_html, it is important to un-check any directories associated with subdomains. Each subdomain should be added as a separate website backup. Including subdomains in your primary domain's backup can lead to issues when restoring file content.
Once you are satisfied with your file choices. Click 'Begin First Backup'.
Next, you will be prompted to add a database. If you have your database connection information, click 'Add Database Now'. If you want to add it later, select 'Go To Dashboard'. If you go to your dashboard, you will now see the progress of your website being activated. CodeGuard will also send you an email once the activation process has completed.
Figure 5: File selection screen used to choose website content for backup.
If this website has a database, follow the CodeGuard support article on adding a database to connect it. To add more websites in the same cPanel account, repeat steps 3 and 4 with the same SFTP credentials. To add websites from a different cPanel account, repeat steps 1 through 4.
Similar questions
• How do I back up websites from multiple cPanel accounts?
• How do I add sites from different cPanel accounts on one server to CodeGuard?
• How do I find SFTP credentials and file paths in cPanel for CodeGuard?
Need assistance?
Contact our team for help with your purchase or issuing your certificate.