> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.faaaster.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How do I import a database into my Faaaster site?

The site's **Tools** tab, **Backup & migration** section, offers **Import DB**. You choose your file from your computer and upload it directly: no need to go through SFTP.

## Importing

1. Open the site, **Tools** tab.
2. **Backup & migration** section, **Import DB** row.
3. Click **Import** to open the window.
4. Click **Choose a .sql / .sql.gz file** and select your dump.
5. Click **Upload and import**.

![The Import DB row, in the Backup & migration section.](https://storage.crisp.chat/users/helpdesk/website/-/9/d/2/d/9d2d3e0b7134b800/act-outils-import-en_1sb9b4b.png)

The window's **Logs** field shows the import log, which lets you follow its progress and understand any failure.

## Accepted formats

`.sql`, `.gz` and `.sql.gz` files, up to **5 GB**.

> **Compress your dump.** A `.sql.gz` file uploads much faster than a raw `.sql`, and the import decompresses it automatically.

> ⚠️ **The import overwrites the existing database.** Create a backup first, from the **Backups** tab.

## After the import: rewriting URLs

**This is the step Faaaster doesn't do for you, and the one that makes most migrations fail.**

A WordPress database stores the site's address hard-coded, in the settings and in the content of the pages. If your dump comes from another site, everything still points to the old address: broken images, redirect loops, unable to log in to the admin.

Faaaster clears the caches after the import, but **doesn't touch the content of your database** — it can't guess which strings need to be replaced.

The rewrite takes a single command, over SSH:

```bash
wp search-replace 'https://old-domain.com' 'https://new-domain.com' --all-tables --precise
```

> **Always do a dry run first.** Add `--dry-run` to the command: WP-CLI tells you how many replacements it would make, without changing anything.

Also think of the variants present in your database: `http://` and `https://`, with and without `www`. Each one needs its own pass.

## If you're not comfortable with the command line

The **Better Search Replace** plugin, installed from the WordPress admin, does the same thing with a form — and also offers a dry run.

👉 [How do I connect via SSH and SFTP?](https://help.faaaster.io/en-us/article/connect-with-ssh-and-sftp-1fijah/) · [How do I use WP-CLI?](https://help.faaaster.io/en-us/article/use-wp-cli-19wrcm0/) · [How do I back up and restore a site?](https://help.faaaster.io/en-us/article/backups-1j7rzgw/)