共计 594 个字符,预计需要花费 2 分钟才能阅读完成。
SugarHosts 在 2025/6/29 無預警突然無法訪問,上網查發現大家都說可能主機商要跑路!之前就研究過怎備份,這次直接寫文章記錄,方便日後查看吧!
這裡推薦 Duplicator 免費使用備份功能,而且用起來也簡單,用了幾次都沒啥大問題,非常方便!自己去去插件市場下載即可
備份
這裡可以修改備份名稱,默認會有時間戳,所以不用改直接下一步即可
還原
這裡我使用本地環境做為測試,把下載好的【還原文件(install.php)】及【備份包】放到本地的 Web 服務器中
接著根據路徑打開還原文件後,找到下圖位置填寫資料庫帳號密碼,並點驗證
最終完成會看到下圖,記得刪除【還原文件(install.php)】
解決本地上傳錯誤
該步驟如果沒遇到本地上傳插件錯誤可以先忽略
使用修改 web-config.php 如下
define('UPLOADS', 'wp-content/uploads');
使用 IIS WebServer 配置
web.config 內容如下
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules><rule name="Main Rule" stopProcessing="true"><match url=".*"/><conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/></conditions><action type="Rewrite" url="index.php"/></rule> <rule name="WordPress: http://localhost/blog" patternSyntax="Wildcard"> <match url="*"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php"/> </rule></rules> </rewrite> </system.webServer> </configuration>
正文完