[page_submenu alignment=”center” sticky=”true” bg_color=”#225277″ link_color=”#ffffff”][page_link title=”Terminology” id=”1518804067871-0-4″ tab_id=”1518804067872-0″ link_url=”#terminology”][/page_link][page_link link_url=”#Archiving” title=”Site Archive” id=”1518803642-1-49″ tab_id=”1518803660068-3″] [/page_link][page_link link_url=”#cPanelArchive” title=”cPanel Archive” id=”1518803642-2-18″ tab_id=”1518803660226-3″] [/page_link][page_link title=”Tools Archive” id=”1518803718168-0-4″ tab_id=”1518803718169-6″ link_url=”#ToolsArchive”][/page_link][page_link title=”Retire Domain, Hosting Account And/Or Site Install” id=”1518803728114-0-1″ tab_id=”1518803728117-4″ link_url=”#Retire”][/page_link][page_link title=”Back To All Guides” id=”1518803746938-0-6″ tab_id=”1518803746940-9″ link_url=”/how-to-guides”][/page_link][/page_submenu]

AWS ARCHIVE TERMINOLOGY

[divider line_type=”No Line” custom_height=”20″]

HostingArchives = cPanel Archive
SiteArchives = Site Archive / Site Backup
ToolsArchives = Plugin Backup

SITE ARCHIVE

[divider line_type=”No Line” custom_height=”20″]

***If using a Mac, you’ll need to configure your tar to run GNU tar before running the scripts below to avoid errors. You’ll only need to do this once on your machine.  To do so, install homebrew at http://homebrew.com. Then, run these commands:

brew install gnu-tar
Archiving Prep
  • If domain will be retiring and/or parked, archive a copy of the full cPanel (so that is will be more easily restored should we need it in the future).
  • If you are backing up to create a “snapshot in time” and the site will remain live, archive a copy of just the site (public_html folder).
  • If demoing this site, see site demo instructions (coming soon).
  • Locate this website in the MainWP Dashboard, and remove this site from the dashboard interface.
AWS S3 Storage
  • In the ubs-archives–>Site Archives folder, locate (or create) a folder labeled with the main domain name of the site you’re archiving.
  • Inside this folder, create another folder for the specific site on this domain that is to be archived, using the following naming convention:
    • LiveURL-archiveDate-#UBS00917 (e.g., unbridled.store-4-24-17-#UBS00917)
  • Add WP site files backup file to this folder. (See instructions below.)
  • Add DB backup of this site to this folder. (See instructions below.)
  • Within this folder, create a ReadMe.txt file with project info. A template for this ReadMe file can be found in the main Site Archives folder.
Manual Backups Of WP Site Files
From Terminal
  • In Terminal, navigate to the folder that you’d like to download the backup file in locally.
  • Use the following command line to download a compressed tarball file of all of the WP files associated with this WP installation:
ssh user@host "cd path/to/dir; gtar -cvf - ." | gzip > dir.tar.gz
    • where user@host is from main SFTP login info for this cPanel account (For example, it might be [email protected].)
    • path/to/dir represents the file path to the directory where the WP files for this particular site start. For example, if this WP install is located in a store folder within the public_html folder for this cPanel account, the path would be public_html/store. In many cases the path might be just public_html. (You can use FTP or FileManager to locate the path if needed.)
    • The dir.tar.gz will be the name of the downloaded file and should end in .tar.gz Use the following naming convention: LiveURL-date-#projectnumber.tar.gz (For example, unbridled.store-4-24-17-#UBS00917.tar.gz)
    • The other pieces of the script should be written exactly as is.
  • When you hit enter…
    • If it asks you if you trust the authenticity of the host, type ‘yes’ and hit enter.
    • You’ll be asked for the password associated with this SFTP user account. Enter it and hit enter.
  • A list of files that are being compressed into the backup file should start to scroll on your Terminal window. When the download is complete, you’ll be returned to the main Terminal prompt.
  • Verify that the download appeared and is about the size you’d expect (a smallish WP install might be around 45MB). If it’s much smaller than this, you may not have copied any (or the right) files.
  • Upload this file.tar.gz file to the AWS S3 project folder that you created above.
Manual Database Backup & Archive
From Liquid Web cPanel
  • In the LW cPanel for this domains hosting account, go to phpMyAdmin.
  • In the left nav within phpMyAdmin, click on the database name associated with this site.
  • Click on the “Export” tab at the top of the screen.
  • Using the default settings, click “Go” to download the .sql file for this databse.
  • Upload this .sql file to AWS S3.

CPANEL ARCHIVE

[divider line_type=”No Line” custom_height=”20″]

Most cPanel Backups will be done through the AWS and you will follow the Full cPanel Backup – AWS Hosting Archive instructions below to archive the cPanel. AWS backs up all cPanel accounts in the morning every day. We will use the LiquidWeb cPanel archive when a site/domain/cPanel has been updated at all during the day or websites where data updates frequently and the site information/file could have changed since the AWS Backup.

[divider line_type=”No Line” custom_height=”20″]
Full cPanel Backup – AWS Hosting Archive
  • In AWS, click on the folder for the server where the site cPanel lives.
    • ubs-web – Dedicated Server
    • ubs-webappssecure – Secure Server
    • ubs-indeed – Indeed Server
  • Select the folder with today’s date and click into the accounts folder.
  • Look for the account name of the cPanel you would like to archive. Note: If you are unsure of the account name tied to the cPanel, you can check this in LiquidWeb, when you list accounts, the account name will be listed in a column.
  • There should be two file types: =meta and tar.gz with the account name.
  • Check the box to the left of the tar.gz file with the cPanel account name. For example, look for the file named in this fashion: accountname.tar.gz (you can ignore the =meta file).
  • Once you check the box, a pop-up will appear in the bottom left corner of your screen with the file name at the top.
  • Select the Download button in the pop-up. The download will save to your local machine
  • Navigate back to the Amazon S3 page using the breadcrumb links in the top right corner of the screen
  • Select the ubs-archives folder.
  • Click on the HostingArchives folder.
  • If a folder of the main domain associated with the cPanel account already exists, select that folder. If no folder exists for the domain, create a new folder using that domain name.
  • Once in the cPanel domain folder, create a folder named today’s date (mm-dd-yyyy).
  • In the new date folder you created, upload the accountname.tar.gz file downloaded in previous steps.
  • Ensure the file has uploaded by refreshing the page when the upload progress bar signifies the upload is complete (or the progress bar disappears).
Full cPanel Backup – Liquid Web
  • In cPanel, navigate to Backup
  • Click ‘Download a Full Website Backup’
  • Here you want to generate a Full Backup to Home Directory
  • If you enter an email address in box below, you will receive an email once the backup has been generated.
  • Verify that the download appeared and is about the size you’d expect.
  • Upload this file.tar.gz file to the AWS S3 project folder that you created above.

TOOLS ARCHIVE

[divider line_type=”No Line” custom_height=”20″]
Plugin Backup

If a updating a plugin has caused past issues on site, locate the same plugin on a different site that has not been updated yet. We want to download the older version of the plugin (the version before the update) as a precaution.

  • SFTP into a site where the plugin in question is installed but has not been updated.
  • Navigate into the plugins folder: public_html/wp-content/plugins.
  • Locate the folder for the plugin you are wanting to back-up.
  • Download the plugin folder to your local machine.
  • Compress the plugin folder creating a zip file.
  • Log in to AWS and navigate into the ToolsArchive folder: ubs-archives/ToolsArchives.
  • If a folder for the plugin already exists, select the folder. If no folder exists, create a folder named after the plugin (refer to existing folder names if you have any questions).
  • In the plugin folder, create another folder titled Plugin Name Version Number (i.e. Typekit Plugin 1.5.1).
  • In the plugin version folder, upload the plugin zip file.

RETIRE DOMAIN, HOSTING ACCOUNT, AND/OR SITE INSTALL

[divider line_type=”No Line” custom_height=”20″]
If Domain Is Being Released
  • From GoDaddy domain registration account:
    • Verify with the Project Manager and/or Client for this project that they do in fact want to release the domain (as opposed to just letting the domain remain Inactive, but On Hold).
    • Once final approval has been given for domain release, switch the AutoRenew feature for this domain registration to OFF. Domain will expire on it’s own once the paid period is complete.
    • Follow the Hosting No Longer Needed instructions below.
If Hosting Will No Longer Be Needed For This Domain
  • From LiquidWeb Root Webhost Manager page:
    • If the domain is being kept, add a redirect for this URL via GoDaddy (if needed).
    • Only delete the hosting account for this domain if 1) there are no other sites using this hosting – for example, subdomains of the site, and 2) it is very unlikely that any other sites will use this domain (or it’s subdomains) in the future.
    • Verify that all WP installs associated with this hosting account have been archived according to the instructions above.
    • Create a new folder in the AWS S3 ubs-archives –> HostingArchives folder named after the associated domain for which hosting is being retired.
    • In the AWS S3 ubs-liquid folder, then in the latest date folder, find the .tar.gz file associated with this hosting account. Migrate this file over to the ubs-archivesàHostArchives –> [domain_name] folder, renaming the folder to add the archive date to the .tar.gz file. (For example ub_store.tar.gz would become ub_store-4-24-17.tar.gz)
    • Add a ReadMe.txt file to this ubs-archives –> HostArchives –> [domain_name] folder, that lists any site URLs that were included in this hosting at the time of backup, plus any additional comments needed. (See ReadMeTemplate.txt file in main HostingArchives folder for template.)
    • Once all that needs to be archived has been backed up, go to the LiquidWeb Webhost Manager page and select “Terminate Accounts” under the “Account Functions” drop down in the left navigation panel.
    • Click red “Remove” button and follow instructions to remove this hosting account.
If Hosting Will Be Kept, But WP Install At This Location No Longer Needed

Delete Associated WP Files
From Terminal

  • Verify that this site has been backed up following the archiving process above.
  • Use the following command line to delete the WP files install (WP files & folders) from the host:
ssh user@host "rm -r -f destination/dir"
    • where user@host is from main SFTP login info for this cPanel account (For example, it might be [email protected].)
    • ***Be sure you know the correct directory before deleting, since this cannot be undone.
    • ***Be sure not to delete the public_html folder.***
    • destination/dir represents the file path to the directory where the WP files for this particular site start. For example, if this WP install is located in a store folder within the public_html folder for this cPanel account, the path would be public_html/store. In many cases the path might be just public_html. (You can use FTP or FileManager to locate the path if needed.) If files are located directly in the public_html folder, you can delete each of the wp-content, wp-admin, wp-includes… folders individually, and the single files in that folder via FTP.
    • The other parts of this script should be typed exactly as shown.
    • Verify that the has been deleted via FTP.

Delete Associated WP Files

  • From LiquidWeb cPanel for this hosting account:
    • Verify that this database has been backed up following the archiving process above.
    • In the LW cPanel for this domain’s hosting account, click on MySQL Databases.
    • Under “Current Databases” delete the database associated with this particular site.
    • Under “Current Users” delete the user associated with this database (as long as you’re sure this user is unique to this database).
    • If applicable, delete associated subdomain from LW cPanel.

Update Master Domain List

  • From shared Excel doc in Office Portal:
    • Update the webdev domain / site audit spreadsheet with these latest changes.