> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/websites/file-manager/edit-and-deploy.md).

# Edit and Deploy Files

Edit a website file in File Manager, review your change against the live version, deploy it, and undo it later if you need to.

There's no **Save** button. Every edit is kept as a pending change, and your live website only changes when you click **Deploy**. This lets you edit several files, check them, and publish them together.

## Edit a file and make it live

{% stepper %}
{% step %}

### Open the file and edit it

Click a file in the tree to open it in the editor. Click once to preview it; double-click it, or start typing, to keep its tab open.

Make your change. The file shows how many lines you added and removed, and the **Deploy** button shows how many changes are waiting.

<figure><img src="https://2590163678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZo6eXGMjwp7EOibdxJ6%2Fuploads%2Fgit-blob-da7dd1487374e2b3105205957a3f945d95558874%2Fedit-file.png?alt=media" alt="index.html open in the editor with one pending change on the Deploy button"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Review your changes

Open the menu next to **Deploy** and choose **Review changes**, or press `Ctrl`/`⌘` + `S`.

<figure><img src="https://2590163678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZo6eXGMjwp7EOibdxJ6%2Fuploads%2Fgit-blob-5b255d5bce83990001b21b02fadb9116a2d18da6%2Fdeploy-options.png?alt=media" alt="Deploy options menu with Review changes highlighted"><figcaption></figcaption></figure>

The side panel switches to **Changes**, and the first file opens next to the live version: **Before** is what's live, **Now** is your edit. Use the **View** buttons to switch between **Side by side** and **Inline**, and the arrows to step through the changed files.

<figure><img src="https://2590163678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZo6eXGMjwp7EOibdxJ6%2Fuploads%2Fgit-blob-070edd5e448bdd08c8bbd1fa81cd395254f3f0fb%2Freview-changes.png?alt=media" alt="Side-by-side comparison of the live file and the edited file"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Deploy

Click **Deploy**. A message confirms that your changes are live.

<figure><img src="https://2590163678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZo6eXGMjwp7EOibdxJ6%2Fuploads%2Fgit-blob-fd02d11f1304374d567bbdfd3d081be79b27faed%2Fdeploy-toast.png?alt=media" alt="Message: Deployed 1 change — live on example.com"><figcaption></figcaption></figure>

Clicking **Deploy** publishes every pending change at once, so you can skip the review when you're sure.
{% endstep %}
{% endstepper %}

## Discard a change

* **One file** — in the comparison, click **Discard**. A message lets you **Undo** it.
* **Everything** — open the menu next to **Deploy** and choose **Discard all changes**, then **Discard all**. Or, in the **Changes** panel, click **Discard all** next to **Not deployed yet** and click it again to confirm.

Discarding all changes can't be undone.

## When the file changed on the server

If someone else changed the file on the server after you opened it — for example, over FTP or from WordPress — File Manager asks before deploying:

* **Keep server version** — drops your edit.
* **Replace server version** — deploys your edit over theirs.

## Restore a previous version

After a deploy, the **Changes** panel lists the files you deployed, grouped by when you deployed them.

<figure><img src="https://2590163678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZo6eXGMjwp7EOibdxJ6%2Fuploads%2Fgit-blob-26ffafde2da00e59995ab3a875247a22be4fd786%2Fdeployed-changes.png?alt=media" alt="Changes panel showing a deployed file with Restore all"><figcaption></figcaption></figure>

1. Click a deployed file to compare it with its previous version.
2. Click **Restore** to stage the previous version again. To restore every file in a group, click **Restore all**, then click again to confirm.
3. Click **Deploy** to make the previous version live.

You can also download the previous version: in the comparison, open **More** and choose **Download previous version**.

This list only covers the current visit to File Manager. For older versions, use [Backups](https://docs.hostinger.com/websites/backups.md).

## Before you leave the page

If you leave File Manager or switch website with changes that aren't deployed, File Manager asks you to confirm. Leaving discards them — deploy first if you want to keep them.

***

*Last updated: November 3, 2026*
