---
title: "Multisite Support"
url: https://phatdev.net/docs/sl-migrations/how-does-sl_migrations-handle-multisite-support
lang: vi
updated: 2026-10-20
alternate:
  en: https://phatdev.net/en/docs/sl-migrations/how-does-sl_migrations-handle-multisite-support
markdown: https://phatdev.net/docs/sl-migrations/how-does-sl_migrations-handle-multisite-support.md
---

# Multisite Support

Thuộc bộ tài liệu: [SL Migrations](https://phatdev.net/docs/sl-migrations.md)

> Plugin xử lý WordPress Multisite (network) như thế nào.

> Lưu ý: bản SL Migrations hiện tại khai báo `Network: false` trong header plugin, nên chỉ kích hoạt theo từng site, không kích hoạt toàn mạng (Network Activate) được. Phần dưới mô tả khả năng xử lý Multisite của lõi backup; hãy thử trên bản sao trước khi áp dụng cho mạng thật.

Plugin hỗ trợ WordPress Multisite - backup toàn bộ network hoặc một subsite riêng.

## Backup full network

**Network Admin → SL Migrations → Packages → Create New**:

- Tick **Include all subsites**
- Plugin backup:
  - Main site (`wp_*` tables)
  - Tất cả subsite (`wp_2_*`, `wp_3_*`, …)
  - `wp_blogs`, `wp_site`, `wp_users`, `wp_usermeta`
  - Toàn bộ `wp-content/uploads/sites/` hoặc `wp-content/blogs.dir/`

## Backup 1 subsite

**Network Admin → SL Migrations → Packages → Create New → Components**:

- Chọn **Subsite Only**
- Chọn subsite ID từ dropdown
- Plugin chỉ backup table của subsite đó và uploads của subsite

Lợi ích: archive nhỏ hơn nhiều, có thể restore vào site standalone.

## Restore subsite thành site standalone

Pattern phổ biến: tách 1 subsite ra thành standalone WordPress riêng.

1. Backup subsite (như trên)
2. Trên server đích, cài WordPress fresh và plugin SL Migrations
3. **Import** archive
4. Installer hỏi "Convert multisite subsite to standalone?" → Yes
5. Plugin tự:
   - Rename table `wp_2_*` → `wp_*`
   - Update `wp-config` (loại bỏ multisite constants)
   - Search & replace URL
   - Clear cache

## Restore standalone thành subsite trong network

Ngược lại - push 1 standalone WordPress vào làm subsite của network:

1. Backup standalone (full mode)
2. Trên multisite, tạo subsite trống mới (giả sử ID 5)
3. **Network Admin → SL Migrations → Import**
4. Upload archive → chọn **Import as subsite ID 5**
5. Plugin rename table → `wp_5_*` và update `wp_blogs`

## Lưu ý

- **Domain mapping**: nếu network dùng domain mapping, đảm bảo plugin domain mapper cũng được backup
- **Network plugins**: plugin active ở network level → backup `wp-content/plugins` là OK
- **Users table**: shared across network, không restore lẻ tẻ → có thể vỡ ownership posts

## Tham khảo

- [Migration WordPress](https://phatdev.net/docs/sl-migrations/how-to-migrate-wordpress-site)
- [Import install](https://phatdev.net/docs/sl-migrations/import-install)
