AI websites

Step-by-step tutorial

Back Up Your AI Website Before Asking AI to Change It

Save a source-code snapshot before an AI edit, check what the ZIP leaves out, and test the copy in a new folder without touching your live website.

Product links on this page are ordinary official links. No affiliate commission is currently attached. Read our disclosure.

Before asking AI to redesign a page, keep a copy of the working source files somewhere the edit cannot overwrite. Then check that you can open and build that copy. A ZIP you have never unpacked is an uncertain fallback.

This walkthrough is for a static website whose source is already in GitHub. It saves one version of the files, not your whole hosting account. If your site depends on a database, customer uploads or a paid builder’s export feature, those need a separate recovery plan.

Save the version you actually want back

Open the repository connected to your website. Check the selected branch and the files before downloading anything. A branch called main is not automatically the working version you meant to save.

Find one recent change you recognize, such as a heading or image filename. If it exists only in your coding workspace, it will not appear in a download of the GitHub version. Do not push unfinished work to a production branch just to make a backup. Ask your coding assistant to preserve those local changes separately, without publishing.

For the version already on GitHub:

  1. Note the repository, branch, date and commit identifier. A commit identifies a recorded version.
  2. Use Code → Download ZIP, as described in GitHub’s archive instructions.
  3. Give the downloaded file a recognizable name, such as my-site-before-homepage-edit-2026-11-02.zip.
  4. Keep it outside the folder AI will edit. Retain another private copy on a separate device or storage location you already use, if available.

Record the commit alongside the ZIP. Downloading the same branch next week can give you different files. If other people or tasks are changing that branch, use the fixed-commit archive option in GitHub’s instructions rather than assuming a branch download still matches your note. This archive does not include the repository’s full version history; GitHub documents broader repository backups separately.

Look inside before you rely on it

Extract the ZIP into a new folder named something like my-site-restore-check. Do not extract it over your working project.

Look for the editable pages, images and styles. A project with a build step should also have its build instructions and dependency files. For this Astro site, those include src, public, package.json and pnpm-lock.yaml. Your project may use different names.

Saving a webpage from your browser is not the same thing: it may give you a rendered page without the source project needed to maintain the site.

Check what lives elsewhere:

  • Hosting settings and environment variables may be stored in the hosting dashboard.
  • Form messages may live with a form provider or in an inbox.
  • Databases and uploaded customer files may be outside the repository.
  • Large media files may need extra checks if the project uses Git LFS. GitHub explains how LFS files are handled in archives.

Do not put passwords or API keys into a text note beside the public source. Keep backups private too. A .gitignore file is not a secret scanner: Git’s documentation says it does not affect files already tracked.

Test the copy without changing the live site

Open the extracted folder in a separate workspace. Read its README before running anything. Use the project’s existing runtime, dependency installation and build commands; do not let AI upgrade packages to make the test easier.

If you are unsure, give your coding assistant this request:

This folder is a recovery copy of my own website.
Read the project instructions and identify the local build and preview commands.
Check whether they call production services or publish anything before running them.
Do not connect to production databases, live forms or other live integrations.
Use the project's existing dependency sources and explain missing configuration.
Build and preview only this copy. Do not edit the original project,
push to GitHub, deploy, overwrite existing source files or add credentials.
Generated build output inside this recovery folder is allowed.
Report the exact commands, results and anything you could not test.

Open the local preview it gives you. Check the homepage, one inner page, an image and a navigation link. Compare recognizable wording with the version you meant to save. A completed build alone does not prove you saved the right content.

If the copy needs missing configuration, stop and write down what is missing. Do not connect it to a live database or enable real form submissions just to obtain a green check.

Keep the recovery copy untouched

Once the check passes, close the preview and leave the ZIP unchanged. Ask AI to work in the original project, with a small, specific edit and a diff you can review.

If you later need the old files, extract another copy into a new folder and compare the affected files. Replacing the live site with an old snapshot could also remove newer work. Use the website update guide for reviewing and publishing an approved repair.

Keep a short note with the archive: which version it contains, which checks passed, and which outside services were not included. That is the information you will need if an edit goes wrong.

What we checked

On October 31, 2026, we made a local ZIP from a verified source snapshot of this Astro site, extracted it into an empty folder and checked all 56 files against the saved version. The restored copy built successfully, and its output checks passed. We used cached dependencies and the direct build commands documented by the project; this was not a fresh installation test or a test of GitHub’s download interface. It did not restore hosting settings, credentials or external data. In a separate local browser check, we rebuilt the same verified snapshot and checked its homepage, an inner page, two images and navigation with Playwright WebKit 26.5. We checked this article’s full text, prompt block and internal links at 1280-, 320- and 390-pixel viewport widths, with no horizontal page overflow or browser/resource errors. The narrow layouts were emulations, not tests on physical phones or Safari.