---
title: "Overwrite Install - Overwrite the current site"
url: https://phatdev.net/en/docs/sl-migrations/overwrite-install
lang: en
updated: 2026-10-20
alternate:
  vi: https://phatdev.net/docs/sl-migrations/overwrite-install
markdown: https://phatdev.net/en/docs/sl-migrations/overwrite-install.md
---

# Overwrite Install - Overwrite the current site

Part of the doc set: [SL Migrations](https://phatdev.net/en/docs/sl-migrations.md)

> Delete the whole running site and restore from a backup.

## Overwrite Install

This mode **completely deletes** the current WordPress on the destination server and then restores from the backup. All current data is lost - use it when you want to roll back or sync a staging site back to production.

## Workflow

### 1. Back up the current site first (important)

Overwrite is not reversible. Create a safe backup before you proceed.

### 2. Upload the installer + archive

Upload both files to the web root:
- The `installer.php` file
- The `archive` file

You can upload through FTP, SFTP, cPanel File Manager, rsync, or any tool your hosting supports.

### 3. Open the installer

```
https://example.com/installer.php
```

The installer detects that WordPress already exists and asks you to choose a mode. Choose **Overwrite** - the installer will:

1. Drop all current database tables
2. Delete the old WordPress files
3. Extract the archive
4. Import the SQL dump
5. Search & replace URLs

### 4. When it is done

The installer deletes its temporary files automatically. Log in to wp-admin with the admin credentials of the **source** site.

## Important notes

- **Back up the database first** - overwrite is not reversible
- Make sure the database details in the installer point to the right database to overwrite
- If DNS does not point to the destination server yet, use the `hosts` file on your local machine to test first

## Common errors

- **Cannot drop database**: the MySQL user has no DROP privilege. Grant `ALL PRIVILEGES` to the user.
- **Permission denied when extracting**: the web root is not writable. See [Fixing permissions](https://phatdev.net/en/docs/sl-migrations/how-to-fix-file-permissions-issues).

## See also

- [Classic Install](https://phatdev.net/en/docs/sl-migrations/classic-install)
- [Import Install](https://phatdev.net/en/docs/sl-migrations/import-install)
