On this page
What this issue is
A backup file is a copy of your site files or database. It becomes exposed when it sits inside the folder your web server publishes (often public_html, www or htdocs) and the server hands it out like any other file.
Common causes: a backup plugin that writes to a public folder, a developer running a quick mysqldump or zipping the site before an update, an editor leaving config.php.bak or index.php.old behind, or a migration archive nobody deleted. Attackers and scanners try common names such as /backup.zip, /db.sql, /site.tar.gz and /wp-config.php.bak automatically.
- Backup createdZip or SQL dump made before an update
- Saved in web rootFile sits in public_html and is never removed
- Found by scannerBots request common file names
- Data downloadedCustomers, passwords and keys are copied
The break is the moment the file is left in a public folder.
Why it costs you leads or sales
A database dump usually holds every lead and customer you have captured: names, emails, phone numbers and sometimes order history. A site archive can hold config files with database passwords and API keys. Once copied, that data can be used for spam, phishing against your customers, or to take over your site.
The business damage is indirect but serious: a data breach you may have to report under privacy law, a hacked site that gets flagged by browsers or search engines and loses traffic, ad accounts suspended for malware, and lost customer trust. Fixing it takes minutes; recovering from a leak takes weeks.
How to check if your site has it
Only test your own site. Request likely file names directly in the browser or with curl. A 200 response with a file download means the file is exposed. A 404 or 403 means it is not served.
for p in backup.zip backup.sql db.sql database.sql site.zip www.zip public_html.zip backup.tar.gz wp-config.php.bak wp-config.php.old index.php.bak .env.bak; do
code=$(curl -s -o /dev/null -w "%{http_code}" "https://example.com/$p")
echo "$code /$p"
done- List the web root for files ending in .zip, .sql, .bak, .old, .tar, .gz, .7z, .rar, .dump and ~
- Check upload and plugin folders, for example wp-content/uploads and any backup plugin folder
- Check for archives named after your domain or a date, such as example.com-2024.zip
- Search Google with site:yourdomain.com ext:zip OR ext:sql OR ext:bak
- Ask your developer and host whether any old copies or staging folders are still online
find /path/to/public_html -type f \( -name "*.zip" -o -name "*.sql" -o -name "*.bak" -o -name "*.old" -o -name "*.tar" -o -name "*.tar.gz" -o -name "*.gz" -o -name "*~" \) -lsHow to fix it
Download a safe copy, then delete the public file
Move the backup to private storage you control, then delete it from the web root. Do not just rename it.
Rotate secrets that were inside it
Change the database password, admin passwords, API keys and salts found in the archive or dump.
Block backup file types at the server
Add a rule so these extensions are never served, even if one is uploaded by mistake. See the snippets below.
Move future backups out of the web root
Send them to a folder above the public directory, to private cloud storage, or to your host's backup tool.
Re-test the URLs
Request the old paths again and confirm they return 404 or 403.
<FilesMatch "\.(bak|sql|zip|tar|gz|7z|rar|old|dump|swp)$|~$">
Require all denied
</FilesMatch>location ~* \.(bak|sql|zip|tar|gz|7z|rar|old|dump|swp)$ {
deny all;
return 404;
}
location ~ ~$ {
deny all;
}Clean the uploads and plugin folders
Using your host's file manager or SFTP, check wp-content/uploads, wp-content and the folders of backup plugins. Delete leftover .zip, .sql and .bak files.
Change the backup plugin destination
In your backup plugin's settings, choose remote storage (such as a cloud drive) or a folder outside public_html instead of a local folder under wp-content.
Add the server rule
On Apache hosts, add the FilesMatch block to .htaccess. On Nginx hosts, ask your host to add the location block.
Deploy only what is needed
Build and deploy from version control so no dumps or archives are ever copied into the public folder.
Store dumps outside the document root
Write mysqldump output to a private directory, for example /var/backups, with permissions limited to the backup user.
Add deny rules in the server config
Use the Apache or Nginx snippets above, then reload the server.
Check files you uploaded
Shopify does not let you place files on the server, but anything in Content > Files is public by URL. Delete exported customer lists or archives uploaded there.
Review apps that export data
Check that export apps send files by email or private link, not to a public file URL.
Review Assets
In the Assets panel, delete any uploaded .zip or data export files. Assets are served from a public CDN URL.
Review the Media Manager
Delete any uploaded archives or data exports. Files in the Media Manager can have public URLs.
Review the Files area
In Website > Pages > Custom Files, remove archives or exports you do not need to serve.
Exposed
- backup.zip sits in public_html
- Anyone can download it with a URL
- Database password and customer data inside
Locked down
- Backups stored off-server or above the web root
- Server rule returns 403 or 404 for backup extensions
- Secrets rotated after the exposure
How to confirm it's fixed
Re-run the curl check
Every path should now return 403 or 404, not 200.
Test from outside your network
Use a private browser window or a mobile connection so you are not logged in.
Search Google again
Try site:yourdomain.com ext:zip OR ext:sql OR ext:bak. If an old file is still indexed, request removal in Google Search Console under Removals.
Check server logs
Look for past 200 responses to those paths to learn how long the file was exposed.
How to prevent it happening again
- Never create backups inside the public folder, even briefly
- Use a backup tool that writes to private or remote storage
- Delete migration archives as soon as the move is verified
- Keep the deny rule for backup extensions in your server config
- Block or avoid editors that leave .bak, .swp or ~ files in the web root, and deploy from version control
- Repeat the curl check after every migration or redesign
- Limit who has SFTP or file manager access
How FunnelGuard handles this
FunnelGuard does not check for exposed backup files today. It is a possible future check. FunnelGuard is a synthetic monitoring service: a robot visitor runs your real customer journeys (lead forms, checkouts, booking and chat buttons) and checks each step, tracking hits and test-lead delivery. It does not scan your server for files.
What it does cover nearby: if a hack or a bad server change breaks a form, a checkout or your tracking, a journey check can fail and you get an alert with a screenshot and a likely cause. That is a symptom, not proof of an exposed backup.
You can try the free plan (1 site, 2 journeys, daily checks, no card) to monitor your funnels, and a free read-only website audit is available too.
Questions people ask
What are exposed backup files?
They are copies of your site or database, such as backup.zip, db.sql or config.php.bak, stored in a folder the web server publishes. Anyone who requests the right URL can download them. They often contain passwords, customer data and source code.
How do I find backup files left on my website?
Request common names like /backup.zip and /db.sql on your own domain and look for a 200 response. Also search the web root over SFTP or SSH for .zip, .sql, .bak and .old files, and try a Google search with site:yourdomain.com ext:sql OR ext:zip.
How do I stop people downloading .sql and .zip files from my server?
Delete the files, then add a server rule that denies those extensions. On Apache use a FilesMatch block in .htaccess; on Nginx use a location block with deny all. Better still, store backups outside the public folder.
Is a backup.zip in public_html dangerous?
Yes. Scanners request names like backup.zip automatically, so it can be found within hours. It may expose your database password, API keys and customer records.
Do I need to change passwords after removing an exposed backup?
Yes. You cannot tell whether someone downloaded the file, so assume they did. Rotate the database password, admin logins, API keys and any secrets stored in the archive.
Where should I store website backups safely?
Store them off the server, such as private cloud storage, or in a folder above the public web root with restricted permissions. Encrypt them if they contain personal data, and use your host's backup tool or a plugin set to remote storage.
Can Google index my exposed backup file?
It can if a link to the file exists somewhere, though many are found by direct scanning instead. If a file was indexed, delete it and use the Removals tool in Google Search Console.
Does FunnelGuard detect exposed backup files?
No. FunnelGuard does not check for this yet; it may be added in future. It monitors funnels such as forms, checkouts and tracking, so use the manual checks in this guide or a security scanner for backup files.
Related issues
- OPS-167Exposed wp-config backups or install scriptsFix guide
- OPS-163Exposed .env fileFix guide
- OPS-164Exposed .git directoryFix guide
- OPS-162Directory listing enabledFix guide
- OPS-166Exposed phpinfo / debug endpointsFix guide
- OPS-158Exposed admin login (/wp-admin, /administrator) without protectionFix guide