Website files & database · Cloudflare
Move your website to Cloudflare
Moving the files is the only part of a hosting migration that touches the website itself. Everything else moves pointers.
Cloudflare has no assisted migration, so this is files and a database moved by hand.
Do it while the old host is still live. Nothing here is visible to the public until DNS changes, so a mistake at this stage costs time and nothing else.
Checked against Cloudflare's documentation on August 9, 2026.
What is different about Cloudflare
The process is standardised. These are the parts that are not — the things that are true of Cloudflare and not of everyone else.
Decide which Cloudflare product you are moving to first
Cloudflare sells 2 distinct hosting products — Pages, Workers — and the differences between them are larger than the differences between providers. Pages gives you Git-connected builds and Direct upload and Wrangler CLI and no database tool; Workers gives you Wrangler CLI and Git-connected builds with D1. Following instructions written for the wrong one is the most common way a migration stalls halfway.
There is no assisted migration
Everything here is manual, which mainly means being systematic: one archive rather than thousands of FTP transfers, a database export you verify by table count, and a test on a temporary URL before anything is public.
Check compatibility first: Cloudflare cannot run PHP
Cloudflare executes Static HTML, CSS and JavaScript, JavaScript and TypeScript on Workers, WebAssembly, with D1 (SQLite), Workers KV, R2 object storage for storage. It is built for static sites and static site generators, jamstack front ends, serverless apis and server-side rendering on workers. What it will not run: PHP — there is no PHP runtime at all; MySQL or MariaDB; WordPress, or any other PHP application, without converting it first. That is the question to settle before any of the mechanics below matter — no file manager rescues an application the platform cannot execute. This is the compatibility question that decides everything else: a PHP site cannot be lifted here, it has to be exported to static HTML or rebuilt
The control panel is custom
File access is via Git-connected builds, Direct upload, Wrangler CLI, and there is no database layer to migrate. The web root is the build output directory.
Cloudflare at a glance
- Languages / runtimes
- Static HTML, CSS and JavaScript, JavaScript and TypeScript on Workers, WebAssembly
- Databases
- D1 (SQLite), Workers KV, R2 object storage
- Built for
- Static sites and static site generators, JAMstack front ends, Serverless APIs and server-side rendering on Workers
- Cannot run
- PHP — there is no PHP runtime at all; MySQL or MariaDB; WordPress, or any other PHP application, without converting it first
- Control panel
- static
- File access
- Git-connected builds, Direct upload, Wrangler CLI
- Database tool
- None
- Web root
- the build output directory
- Assisted migration
- Not offered
Cloudflare hosting packages
Cloudflare sells more than one kind of hosting, and they are not interchangeable. Pick the row that matches what you bought before following any steps.
Pages
staticStatic site hosting deployed from a git repository or by direct upload, with optional serverless functions.
- Best for
- Static site generators, JAMstack front ends, documentation sites
- File access
- Git-connected builds, Direct upload, Wrangler CLI
- Database tool
- None
- Languages
- Static HTML, CSS and JavaScript, JavaScript and TypeScript functions
- Databases
- D1 (SQLite), Workers KV, R2
- Cannot run
- PHP; MySQL; WordPress
- 20,000 files per site on free plans, 100,000 on paid
- 25 MiB maximum for any single asset
- Builds time out after 20 minutes; 500 deployments a month on free
Migrating into it: Not a destination for a PHP site. Moving WordPress here means exporting to static HTML or rebuilding — a conversion, not a migration.
Workers
staticServerless compute at the edge, able to serve static assets alongside server-rendered responses and APIs.
- Best for
- Server-side rendering, APIs, full-stack JavaScript applications
- File access
- Wrangler CLI, Git-connected builds
- Database tool
- D1
- Languages
- JavaScript, TypeScript, WebAssembly
- Databases
- D1 (SQLite), Workers KV, R2, Durable Objects
- Cannot run
- PHP; MySQL; Traditional long-running server processes
- Execution time and memory limits per request
Migrating into it: The route for anything dynamic, but it means rewriting the application in JavaScript rather than moving it.
Step-by-step
- 1At your current provider
Back up before anything else
Take a copy of the files and the database and keep it off both hosts. This is not the migration copy — it is what you restore from when the migration copy turns out to be incomplete.
- Files from your current host's file manager or over FTP
- Database as a single SQL export
- Store both somewhere that is neither the old host nor the new one
- 2Either side
Or move it by hand into the build output directory
Compress on the server and move one archive. Dragging thousands of small files over FTP is where migrations stall.
- Turn on hidden files before compressing, or .htaccess is left behind
- Upload the archive into the build output directory and extract it there
- If the archive contained the web root folder itself, move the contents up one level
- 3At Cloudflare
Test before you touch DNS
This is what separates a calm migration from a bad one. Load the new copy while the old host still serves the public.
- Use the temporary URL Cloudflare provides
- Better: a hosts file entry so the real domain resolves here for you only, which catches redirect loops a temporary URL hides
- Click through properly — forms, logins, checkout, an image deep in an old post
- Match the PHP version to the old host first; upgrade later as a separate change
hosts file entry (macOS/Linux: /etc/hosts)203.0.113.10 example.com www.example.com
Best practice
The habits that make this go smoothly, independent of which providers are involved.
- Confirm Cloudflare runs your application's language and database before anything else — Static HTML, CSS and JavaScript, JavaScript and TypeScript on Workers, WebAssembly with D1 (SQLite), Workers KV, R2 object storage
- Copy rather than move, and keep the old site running until the new one is verified
- Test on a temporary URL or via a hosts file entry before changing any DNS
- Compress on the server and transfer one archive, not thousands of files
- Match the old PHP version first; treat upgrading as a separate change
- Stop publishing on the old site once the copy is taken, or that content is lost at cutover
- Keep the old host active for two weeks after cutover as your rollback
What goes wrong
The failures that actually happen when Cloudflare is the destination.
Cloudflare cannot run everything
Can cause downtimeIt does not support PHP — there is no PHP runtime at all; MySQL or MariaDB; WordPress, or any other PHP application, without converting it first. If your site depends on any of those, this is not a migration — it is a rebuild or a conversion, and finding that out after you have started is expensive. Confirm what your application actually needs before moving anything.
Hidden files are silently skipped
Can cause downtime.htaccess and similar dotfiles do not appear in most file managers until you enable hidden files, and are not included in an archive built from a selection that never showed them. A WordPress site missing .htaccess loads the homepage and 404s everywhere else.
Email does not live in the files
Can cause downtimeMailboxes are not in the web root and not in the database. If your old host provided email, that is a separate migration — download it over IMAP before cancelling, or the messages go with the account.
Product note: Cloudflare
Can cause delaysPages serves static assets and serverless functions — there is no PHP runtime and no MySQL database, so a WordPress or other PHP site cannot be moved here as-is and must be exported to static HTML or rebuilt. Confirm which product you are on before following any of these steps, because the routes differ.
Product note: Cloudflare
Can cause delaysFree plans allow up to 20,000 files per site and paid plans up to 100,000, with a 25 MiB ceiling on any single asset. Confirm which product you are on before following any of these steps, because the routes differ.
Product note: Cloudflare
Can cause delaysBuilds time out after 20 minutes, and free projects are limited to 500 deployments a month. Confirm which product you are on before following any of these steps, because the routes differ.
Where are you coming from?
Most of this job depends on the destination. These are the bits that depend on where you are coming from.
Coming from cPanel hosting
Cloudflare does not use cPanel, so the shape differs at this end: files go in via Git-connected builds or Direct upload or Wrangler CLI. The export side is familiar; the import side is not.
Coming from managed WordPress
There is usually no cPanel and no phpMyAdmin to export from, so use a migration plugin that produces a portable archive. Do it while the source is still publicly reachable — most tooling, works by fetching the live site.
Coming from a site builder
Wix, Squarespace and similar do not give you the files at all. There is nothing to migrate in the normal sense; the site has to be rebuilt or exported to static HTML, and content moved across separately.
Common questions
What languages does Cloudflare support?
Static HTML, CSS and JavaScript, JavaScript and TypeScript on Workers, WebAssembly, with D1 (SQLite), Workers KV, R2 object storage. It is intended for static sites and static site generators, jamstack front ends, serverless apis and server-side rendering on workers. It cannot run PHP — there is no PHP runtime at all; MySQL or MariaDB; WordPress, or any other PHP application, without converting it first.
Does Cloudflare migrate my site for me?
No. Cloudflare does not offer an assisted migration, so the move is manual.
Can I move without downtime?
Yes. Copy the site, test it on a temporary URL while the old host still serves the public, and change DNS only once it works. There is no window where nothing answers — the risk is cutting over to an untested copy, not the cutover itself.
What about my email?
It does not come with the files. Mailboxes are a separate system, and MX records are a separate job again. Plan both explicitly rather than assuming a hosting migration covers them.
What happens to my SSL certificate?
Certificates do not transfer. Cloudflare issues its own once the domain resolves to it, which means a short period after cutover where HTTPS may warn. Provision it as soon as DNS points here, and check the site still forces HTTPS.
Reference documentation
Provider interfaces change. When these steps and the official documentation disagree, the documentation wins.
The same job at other providers
Move your website to Bluehost
Decide which Bluehost product you are moving to first
Move your website to GoDaddy
Decide which GoDaddy product you are moving to first
Move your website to SiteGround
Decide which SiteGround product you are moving to first
Move your website to Hostinger
Decide which Hostinger product you are moving to first
Move your website to WP Engine
The Automated Migration plugin is free
Want this done for you?
I move sites onto Cloudflare regularly — files, database, DNS and the registrar — with the old provider kept as a rollback until it has settled.