# Backups > How DooFiles keeps the previous versions of the files you save or replace, how many it keeps and for how long, and how to restore one from the right-click menu or the editor. Source: https://doothemes.com/docs/doofiles/files/backups --- ## Overview Every time you replace the content of a file with DooFiles, it first keeps a copy of the version you are replacing. If a change breaks something, you can go back to how the file was. This works for any file, from a PHP file you edited to an image you replaced by uploading a new one. You do not need to do anything: DooFiles makes these copies on its own, and deletes the old ones after a while. ## When DooFiles keeps a version DooFiles copies the current version of a file before: - **saving it in the editor**, including when you choose **Save anyway** because the file changed on the server; - **replacing it with an upload**, when you choose **Replace** because a file with the same name already exists; - **restoring an older version**, so the restore can also be undone. Renaming, moving and extracting a zip file never replace a file, so they do not need a backup. Deleted files go to the [Trash](https://doothemes.com/docs/doofiles/views/trash) instead. When the save keeps a version, the editor tells you: *File saved. The previous version was kept as a backup.* ## How many versions, and for how long | Setting | Default | What it does | |---|---|---| | **Backups per file** | 10 | How many versions DooFiles keeps of each file. When it makes a new one, the oldest goes | | **Days to keep backups** | 30 | After this, a version is deleted, even if the file has fewer versions than the limit | Change them in **DooFiles › Settings**. See [Retention](https://doothemes.com/docs/doofiles/settings/retention). Files larger than 50 MB are not backed up, to save space on your server. When you save one, DooFiles shows *File saved.* without mentioning a backup. ## Restore a previous version 1. In the file list, right-click the file and choose **Versions…**. If the file is open in the [editor](https://doothemes.com/docs/doofiles/files/editor), click **Versions** instead. 2. DooFiles lists the versions of the file, newest first, with the date and size of each one. Click the one you want. 3. Confirm: *The file will go back to the version saved on Oct 24, 2026, 10:13. The current version is kept as a backup.* DooFiles shows *Version restored.* If you change your mind, open the versions again: the version you replaced is the newest one. **Versions…** appears in the menu only for files that have saved versions. Restoring a PHP file, or a server file such as `.htaccess`, asks for your password, the same as saving it. See [Password confirmation](https://doothemes.com/docs/doofiles/security/password-confirmation). [SCREENSHOT_HERE: The right-click menu of an image with Versions…, and the list Restore a previous version open next to it with two versions, their date and size] ## Versions follow the name of the file DooFiles keeps the versions of each file by its name and folder. If you rename or move a file, its earlier versions are not listed under the new name. They stay under the old name until they expire, and come back if the file returns to that name and folder. ## Where versions are kept, and how much space they take Versions live in a private folder of DooFiles, inside `wp-content`. It is closed to the web and does not appear in the file list. The [Space](https://doothemes.com/docs/doofiles/views/space) view shows how much space the backups take. To use less, keep fewer versions per file, or fewer days, in [Retention](https://doothemes.com/docs/doofiles/settings/retention). Deleting DooFiles also deletes its backups. See [Installation](https://doothemes.com/docs/doofiles/installation#deactivating-and-deleting). [SCREENSHOT_HERE: The Space view with the size of the Trash and of the backups] ## Troubleshooting | Problem | What to do | |---|---| | **Versions…** does not appear in the menu | The file has no saved versions yet, or they expired. It also does not appear in read-only mode | | *No saved versions yet* | The file has not been saved or replaced with DooFiles yet, or its versions expired | | The versions of a file disappeared after I renamed it | Versions follow the name. Rename the file back to see them, then copy what you need | | Saving said *File saved.* but no version was kept | The file is larger than 50 MB, so DooFiles does not back it up | | I replaced an image by uploading and want the old one back | Right-click the image and choose **Versions…** | | The backups take too much space | Lower **Backups per file** or **Days to keep backups** in [Retention](https://doothemes.com/docs/doofiles/settings/retention) | Need more help? [Open a support ticket](https://doothemes.com/account/tickets/new).