That failure is the single most common outcome when people try to clone a website in 2026, and most guides on this topic still recommend the tool that produces it. This guide covers what cloning actually copies, the four methods that work, which one fits your situation, why your clone is broken, and where the legal line sits.
Cloning a website means copying its front-end files, HTML, CSS, JavaScript, and images, so you can view or edit them locally. Four methods exist: static mirroring with wget or HTTrack, manual copying with browser DevTools, CMS migration plugins for your own site, and AI cloners that rebuild the rendered page. No method copies server-side code or databases.
Table of Contents
What “Cloning a Website” Actually Means
A website has four layers, and the word “clone” gets used for all of them even though no single tool copies more than one or two. Knowing which layer you need is what decides the method, and it is the step most people skip.
| Layer | What it contains | Can you copy it? |
|---|---|---|
| Front-end files | HTML, CSS, JavaScript, images, fonts | Yes, these are public by definition |
| Rendered output | The DOM after JavaScript runs | Yes, through a browser or headless browser |
| CMS content and database | Posts, pages, users, settings, products | Only with account access to the source |
| Server-side code | PHP, application logic, APIs, environment config | No. Never leaves the original server |
That last row explains why so many clones disappoint. Forms, search, logins, and checkout in a mirrored site are decorative. They look right and do nothing, because the code that processed them stayed behind. A downloaded copy of an ecommerce site is a photograph of a shop, not a shop.
The Distinction That Changes Everything
Cloning your own site and copying someone else’s are different tasks with different tools, different difficulty, and completely different legal footing. This guide treats them separately, and you should too.
Your own site: you have database access, so a complete, working copy is achievable. Someone else’s: you can only reach the public front end, so you get an appearance, not a functioning site.
Is It Legal to Clone a Website?
Downloading publicly served HTML and CSS is what every browser does on every page load, and doing it deliberately for study or archiving is generally fine. Republishing someone else’s content, design, branding, or trademarks as your own is copyright and trademark infringement. The method is not the issue. What you do with the copy is.
What Is Generally Fine
Cloning a site you own or have written permission to copy. Saving pages for offline reading or personal archiving. Studying how a layout or interaction was built. Taking general patterns and techniques as input to original work. Building a local copy to test changes before touching production.
What Crosses the Line
Republishing a copied site under your own domain. Reusing someone’s copy, images, or branding. Presenting a competitor’s design as your own work. Ignoring an explicit prohibition in a site’s terms of service. Defeating bot protection or CAPTCHAs to get content the owner has deliberately fenced off.
There is a middle case worth naming, because people get it wrong honestly. Learning from a site’s CSS and rebuilding a similar layout yourself is normal practice and always has been. Downloading that CSS and shipping it unchanged is not the same thing, even though both start at the same DevTools panel.
The Reason This Article Stops Short of Deployment
Site cloning is the standard first step in phishing. Attackers mirror a bank, a workplace login, or a payment page, change where the form submits, and put it on a lookalike domain. The workflow is identical to “download a site, swap the content, upload it to a host.”
So this guide covers cloning for your own sites, for offline use, for learning, and for prototyping. It does not cover deploying a copy of someone else’s site to a live domain, because there is no version of that which is both legal and worth publishing instructions for. If you want a site that looks like one you admire, the legitimate route is a template, a design agency, or building it yourself from the patterns you learned.
Four Methods, and What Each One Copies
| Method | Best for | Copies | Breaks on |
|---|---|---|---|
| CMS migration or host staging | Your own site | Everything: files, database, settings | Nothing, if you have access |
| wget or HTTrack mirror | Static sites, archiving, offline reading | Public front-end files | JavaScript apps, logins, bot protection |
| Browser DevTools or Save Page | A single page | That page’s HTML, CSS, images | Multi-page needs, lazy-loaded content |
| AI website cloner | Design reference, prototyping | A rebuilt version of the rendered page | Exact structure, class names, fidelity |
Pick by outcome. Wanting a working copy of your own site and wanting a design reference from someone else’s are different jobs, and using the wrong tool is why most attempts fail.
Method 1: Clone Your Own Site
This is what most people searching for this actually need, and it is the easiest of the four because you have database access. Migration plugins and host staging tools copy files, database, and settings together, producing a genuinely working duplicate rather than a shell.
WordPress: The Plugin Route
Several plugins handle a full site copy. Duplicator, All-in-One WP Migration, and Migrate Guru are the commonly used options. The pattern is the same across all of them: the plugin packages your files and database into an archive, you upload that archive to the destination, and a script rewrites the URLs.
Two things go wrong reliably. Archive size limits on shared hosting stop large sites mid-export, which is when the paid tiers or a host-level tool become worth it. And serialized data in the database breaks if URLs are replaced with a plain find-and-replace rather than a tool that understands serialization. Use the plugin’s own URL replacement rather than editing the SQL by hand.
WordPress: The Host Staging Route
Most managed hosts now offer one-click staging, which clones your live site to a staging subdomain and lets you push changes back when you are satisfied. This is the cleanest option when it exists, because the host handles URL rewriting, database prefixes, and file permissions. If your host offers it, use it before reaching for a plugin.
Staging is also the correct answer to a question people ask in a roundabout way. If your real goal is “test a change without breaking my site,” you want staging, not a clone. Our guide to WordPress local development covers the local version of the same workflow, and the PHP upgrade walkthrough in preparing your site for WordPress PHP 8 shows why testing on a duplicate matters before a version change.
The Manual Route
For non-WordPress sites, or when plugins fail, copy the two halves separately.
bash
# Files, over SSH
rsync -avz user@server:/var/www/mysite/ ./mysite-copy/
# Database
mysqldump -u username -p database_name > backup.sql
Then import the database on the destination, update the connection credentials in your config file, and search-replace the old domain for the new one. On WordPress, wp-cli handles that last step safely:
bash
wp search-replace 'https://oldsite.com' 'https://newsite.com' --skip-columns=guid
The --skip-columns=guid flag matters. GUIDs are identifiers rather than URLs, and rewriting them makes feed readers treat every existing post as new.
Method 2: Download a Site for Offline Reading or Archiving
This is the classic approach, and it works well within its limits. Both tools below crawl public pages and save them with links rewritten so the copy browses offline.
wget
One command, no setup, available on macOS and Linux and through WSL on Windows:
bash
wget --mirror --convert-links --adjust-extension \
--page-requisites --no-parent \
--wait=1 https://example.com
What each flag does: --mirror enables recursive download, --convert-links rewrites links for local browsing, --adjust-extension adds .html where needed, --page-requisites pulls CSS, JS, and images, --no-parent stops it climbing above your starting directory, and --wait=1 pauses a second between requests.
Leave the wait flag in. Downloading a site at full speed is indistinguishable from a small denial of service attack from the server’s point of view, and it is the fastest way to get your IP blocked.
HTTrack
HTTrack offers a graphical interface, which suits people who would rather not use a terminal. It is free, open source, and available for Windows, Linux, and macOS.
One fact worth knowing before you download it: HTTrack’s official Windows release is still version 3.49-2, from May 2017. That is nine years old. It still works on simple static sites, and it is genuinely poor at anything modern. If you are evaluating it against wget, this is the deciding detail, and almost no guide recommending HTTrack mentions it.
Why Both Fail on Modern Sites
Neither tool runs JavaScript. They save what the server sends, and single-page applications built with React, Vue, Angular, or Svelte send a nearly empty HTML shell that fills itself in afterwards. Mirror one and you get a blank page or a permanent loading spinner.
They also cannot follow you past a login, cannot capture content that loads on scroll or click, and copy no server-side code at all. WordPress sites hosted behind typical third-party configurations are frequently reported as close to impossible to mirror this way.
Method 3: Copy a Single Page with DevTools
When you want one page rather than a site, the browser is the better tool, and it handles JavaScript because it is the thing running the JavaScript.
The fastest route is the browser’s own Save Page As, Webpage Complete option, which pulls the HTML and its assets into a folder in one step.
For more control, open DevTools with F12, go to the Elements panel, right-click the <html> node, and copy the outer HTML. That gives you the rendered DOM rather than the original source, which is exactly what you want on a JavaScript-heavy page and exactly what static mirrors cannot reach.
Two caveats. What the Elements panel shows can differ from the served source, so the copy will not match the original file structure. And copied CSS usually points at assets in their original locations, so styles and images break the moment you move the files elsewhere. Expect to fix paths.
Method 4: AI Website Cloners
A newer category. These read a rendered page and generate fresh HTML, CSS, and JavaScript that approximates it. Because they use a real browser engine, they handle React and Vue pages that defeat wget and HTTrack.
The important thing to understand is that they rebuild rather than copy. The output is new code that resembles the original visually, with different structure and different class names. For a mockup, a prototype, or an editable starting layout, that is an advantage. For faithful reproduction, it is a limitation.
Fidelity varies considerably, complex interactions usually do not survive, and most of these tools charge for the download even when capture is free. Treat the output as a starting point that needs real work, not a finished site.
Why Your Clone Is Broken
Most cloning problems have one of six causes. This table is the fastest route from symptom to fix.
| Symptom | Cause | Fix |
|---|---|---|
| Blank page or endless spinner | JavaScript-rendered site, tool saved the empty shell | Use DevTools or a headless browser instead |
| Only the homepage downloaded | Crawl depth limit, or links are JavaScript-driven | Raise depth, or the site is not mirrorable this way |
| No styling, plain text page | CSS paths still point at the original server | Rewrite paths, or re-run with --convert-links |
| Images missing | Lazy loading, or a CDN on a different domain | Save images manually, or widen the domain scope |
| 429 errors, download stops | Rate limiting or bot protection | Slow down. Do not try to defeat it |
| Forms and search do nothing | Server-side code was never copied | Expected. Rebuild the backend yourself |
That last row is not a bug. It is the defining limit of every method in this article, and the reason a mirrored site is a reference rather than a replacement.
If a site sits behind a CAPTCHA or a persistent block, stop. That is the owner stating clearly that they do not want automated copying, and working around it moves you from a grey area into a clear one.
How to Edit the Cloned Files
Open the folder in a code editor. Visual Studio Code is the common choice and is free, with syntax highlighting, search across files, and a built-in terminal.
Work in this order, because it minimises the amount you break:
- Get it running locally first. Open
index.htmlin a browser and confirm what works before changing anything. For anything needing a server, runpython3 -m http.server 8000in the folder and openlocalhost:8000. - Fix asset paths. Broken styling is nearly always absolute URLs pointing at the original server. Search for
https://in your CSS and HTML and convert what should be local to relative paths. - Replace content before touching structure. Text and images first. This is also the step where you remove anything that is not yours to keep.
- Then edit CSS. Colors, fonts, spacing. Use DevTools to experiment live, then write the changes into the file once you are happy.
- Test responsively. Use the device toolbar in DevTools to check narrow widths. Copied layouts frequently have media queries that no longer match your content.
Keep an untouched copy of the original download. You will want to compare against it, and re-downloading is slower than reverting a file.
Frequently Asked Questions
How do I clone a website?
Pick the method that matches your goal. For your own site, use a CMS migration plugin or your host’s staging feature, which copies files and database together. For offline reading, use wget or HTTrack. For one page, use your browser’s Save Page As or DevTools. For a design reference from a JavaScript-heavy site, use an AI cloner.
Is it legal to clone a website?
Downloading publicly served HTML and CSS is generally fine, and it is what a browser does anyway. Republishing someone else’s content, design, or branding as your own is copyright and trademark infringement. Cloning your own site, archiving for personal use, and studying code are legitimate. Deploying a copy of someone else’s site is not.
Why does HTTrack only download the homepage?
Usually because the site’s navigation is JavaScript-driven, so HTTrack never sees the links, or because the crawl depth is set too low. It can also mean the site returns an almost empty HTML shell that fills in through JavaScript. In the last case no amount of configuration helps, and you need a browser-based method.
Can you clone a website that uses JavaScript?
Not with wget or HTTrack, which save what the server sends before any JavaScript runs. Browser DevTools work because the browser has already rendered the page, and AI cloners work because they drive a real browser engine. Both capture the rendered output rather than the original source files.
How do I clone a WordPress site?
Use a migration plugin such as Duplicator, All-in-One WP Migration, or Migrate Guru, or your host’s one-click staging if it offers one. These copy files and database together and rewrite URLs correctly. Do not try to mirror a WordPress site with HTTrack, which produces a broken static shell.
Can I copy a website’s design without copying its content?
Yes, and that is the version worth doing. Study the layout, spacing, type scale, and interaction patterns, then rebuild them with your own markup and your own content. Downloading the CSS and shipping it unchanged is a different act legally, even though both start in the same DevTools panel.
What is the difference between cloning and scraping?
Cloning copies a site’s structure and assets to reproduce or study the site itself. Scraping extracts specific data, such as prices or listings, usually into a spreadsheet or database. Cloning cares about the presentation. Scraping discards it.
Can I clone a website for free?
Yes. wget, HTTrack, browser DevTools, and Save Page As all cost nothing, and WordPress migration plugins have free tiers that cover most small sites. Paid options exist mainly for large site archives and for AI cloners, which typically charge for downloading the generated project.
Why does my cloned site have no styling?
The CSS files either did not download or are still referenced by absolute URLs pointing at the original server. Re-run wget with --page-requisites and --convert-links, or search your HTML and CSS for https:// and convert those references to relative paths.
Do forms and logins work on a cloned site?
No. Forms, search, logins, and checkout are processed by server-side code that never leaves the original server. A mirrored site reproduces their appearance and none of their function. Making them work means building the backend yourself.
How do I clone my site to a staging environment?
Most managed hosts provide one-click staging that duplicates your live site to a subdomain and lets you push changes back. Where that is unavailable, a migration plugin pointed at a subdomain does the same job. Always test on staging before making changes to a live site.
Can cloning a website get you sued?
Downloading for personal study or archiving rarely attracts action. Republishing someone’s content, design, or branding can lead to takedown notices and infringement claims. Cloning a site to impersonate it is a criminal matter in most jurisdictions, not a civil one.
What to Do Next
The spinner at the start of this article is the whole lesson. The tool was not broken and the site was not protected. The method simply did not match the thing being copied, and no amount of configuration was going to bridge that gap.
So start by naming your goal in one sentence. Duplicating your own site means a migration plugin or host staging. Reading offline means wget. Studying one page means DevTools. Prototyping a layout means an AI cloner or a rebuild by hand. Four sentences, four different tools, and picking correctly takes ten seconds and saves an afternoon.
One question worth answering honestly before you begin. Do you want this site’s code, or do you want a site that works the way this one does? Those are very different projects, and only one of them starts with a download.











