Hostinger 可使用现有的自动备份,将网站文件和数据库轻松恢复到之前的状态。本流程不适用于使用 Hostinger 建站工具创建的网站。

初始注意事项

  • 恢复备份后,网站将回到备份创建时的状态;备份日期之后的任何更改都将被撤销。
  • 作为额外保障,恢复前可先将当前网站数据下载到本地。
  • 以下方法适用于同一账户内恢复网站、文件和数据库。若要在不同 Hostinger 账户间恢复,请参考相应迁移指南。

进入 网站(Websites)部分,找到目标网站并点击“面板(Dashboard)”,侧边栏找到 备份(Backups)并点击。

方法 1 – 完整恢复 WordPress 网站

Hostinger backups page with Restore and download tab, Website backup selected, Restore website button highlighted
Hostinger backups page with Restore and download tab, Website backup selected, Restore website button highlighted
Hostinger hPanel full website restore screen showing a highlighted “No backups found” warning
Hostinger hPanel full website restore screen showing a highlighted “No backups found” warning
Hostinger backup restore confirmation with Restore button highlighted
Hostinger backup restore confirmation with Restore button highlighted
Hostinger backups page showing website restore in progress at 1%
Hostinger backups page showing website restore in progress at 1%
Hostinger Backups restore history tab and status column highlighted in backup table
Hostinger Backups restore history tab and status column highlighted in backup table

仅适用于 WordPress 网站,可一键恢复全部文件和数据库。在备份页面,该选项默认选中。在下拉列表选择域名和偏好日期,点击“恢复网站(Restore website)”,确认后再次点击“恢复(Restore)”。通常需 10–15 分钟,可在“恢复历史(Restore History)”标签查看进度。完成后请清除浏览器缓存再访问。

方法 2 – 恢复特定网站、子域名或目录

Hostinger Backups page with Files backup tab selected and Show files link highlighted
Hostinger Backups page with Files backup tab selected and Show files link highlighted
Hostinger backup files list with Restore selected button highlighted
Hostinger backup files list with Restore selected button highlighted
Hostinger backup files list with public_html folder selected for restore
Hostinger backup files list with public_html folder selected for restore
Backup restore screen with subdomain1 selected and a Restore selected button
Backup restore screen with subdomain1 selected and a Restore selected button
Hostinger backups page showing website restore in progress at 1%
Hostinger backups page showing website restore in progress at 1%
Hostinger backups page with Restore history tab and Status column highlighted
Hostinger backups page with Restore history tab and Status column highlighted

适用于托管多个网站、子域名或目录,仅想选择性恢复部分文件或文件夹的情况。
点击“文件备份(Files backups)”,选择偏好日期,点击“显示文件(Show files)”。要仅恢复一个域名及其子域名,选中该网站文件夹并点击“恢复所选(Restore selected)”;要恢复特定目录或子域名,进入其 public_html 文件夹后选择目录并点击“恢复文件(Restore files)”。若部分恢复包含整个网站,请务必将数据库恢复到与文件备份相同的日期。

恢复特定文件

Hostinger backups page with Files backup selected and Show files link highlighted
Hostinger backups page with Files backup selected and Show files link highlighted
Hostinger backup files list with the public_html folder highlighted for selection
Hostinger backup files list with the public_html folder highlighted for selection
Backup file list with default.php selected and Restore selected button visible
Backup file list with default.php selected and Restore selected button visible
Hostinger backups page showing website restore in progress at 1%
Hostinger backups page showing website restore in progress at 1%
Hostinger backups page with the Restore history tab and Status column highlighted
Hostinger backups page with the Restore history tab and Status column highlighted

仅恢复特定文件(如 wp-config.php、.htaccess 等)。点击“文件备份(Files backups)”,选择日期,点击“显示文件(Show files)”,打开 domains 文件夹、进入对应网站的 public_html,选中所需文件并点击“恢复文件(Restore files)”。通常只需几分钟。你可通过 FTP 下载备份再上传所需文件来恢复 public_html 子文件夹中的个别文件。

恢复数据库

Hostinger database backup tab with Restore database button highlighted
Hostinger database backup tab with Restore database button highlighted
Hostinger backup restore error message with retry button and selected backup u123456789_base
Hostinger backup restore error message with retry button and selected backup u123456789_base
Hostinger backups page showing in-progress database restore from backup
Hostinger backups page showing in-progress database restore from backup
Hostinger backups restore history tab showing status success table
Hostinger backups restore history tab showing status success table

点击“数据库备份(Database backups)”,选择偏好日期,点击“恢复数据库(Restore Database)”。注意:恢复前数据库必须已存在于“当前 MySQL 数据库列表”中,否则请先用相同名称创建数据库后重试。

恢复子域名的备份

Hostinger hPanel sidebar with Backups menu item highlighted under Files
Hostinger hPanel sidebar with Backups menu item highlighted under Files
Hostinger backups page with Restore and download tab and Website backup selected
Hostinger backups page with Restore and download tab and Website backup selected
Hostinger website backup restore page with Restore website button and Change domain link highlighted
Hostinger website backup restore page with Restore website button and Change domain link highlighted
Hostinger backup restore in progress, showing website restoration at 1%
Hostinger backup restore in progress, showing website restoration at 1%
Hostinger backups page with the Restore history tab and Status column highlighted
Hostinger backups page with the Restore history tab and Status column highlighted
Hostinger backups page showing “No backups available” for Website backup
Hostinger backups page showing “No backups available” for Website backup

注意:此功能仅适用于在子域名下创建的 WordPress 网站。进入 网站(Websites)→ 面板(Dashboard),侧边栏找到 备份(Backups),在“恢复与下载(Restore and download)”→“网站备份(Website backup)”中点击“更改(Change)”选择正确的域名/子域名,点击“恢复网站(Restore Website)”。

来源:Hostinger 官方帮助文档