[WordPress] 外掛分享: SnapShots

首頁外掛目錄 › SnapShots
WordPress 外掛 SnapShots 的封面圖片
20+
安裝啟用
★★★☆☆
3.7/5 分(3 則評價)
468 天前
最後更新
問題解決
WordPress 6.6+ PHP 7.4+ v2.8.2 上架:2020-05-11

內容簡介

您正在 WordPress 網站上進行開發並希望擁有目前站點狀態的快照嗎?SnapShots 可以幫助您保存 WordPress 環境的狀態。

只需點擊一下即可保存站點快照。
為易於區分,命名您的快照。
SnapShots 可儲存當前位置並在恢復後重新導向。
儲存和還原上傳文件夾中的資料表和文件。
自動登錄當前用戶。
自動清除同名舊快照。
佔用空間較小,介面簡單。

選項

所有選項都是透過常數定義的,可以使用過濾器覆蓋。 選項的格式如下:

SNAPSHOTS_[選項名稱]

最好在 wp-config.php 檔案中定義自訂選項常數。

您可以使用過濾器選項,例如:

add_filter('snapshots_[選項名稱]',function($default_option){
返回 $my_option;
});

預設選項
// 預設儲存位置。
SNAPSHOTS_FOLDER:WP_CONTENT_DIR . '/.snapshots'

// 為每個命令添加“--allow-root”,如果您以root身分運行命令。
SNAPSHOTS_CLI_ALLOW_ROOT:false

// 定義 'wp' 二進位檔案的位置。
SNAPSHOTS_CLI_PATH:'/usr/local/bin'

// 保留相同名稱的快照數量。
SNAPSHOTS_MAX_SHOTS:2

// 快照包括內容文件夾中的檔案。
SNAPSHOTS_SAVE_FILES:true

// 快照包括建立時的位置(URL)以在還原時重新導向。
SNAPSHOTS_SAVE_LOCATION:true

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.8.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「SnapShots」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

You are developing things on a WordPress site and would like to have a snapshot of the current state of your site? SnapShots will help you save states of your WordPress environment.

Save snapshots of your site with a simple click.
Name your snapshots for easy distinction.
SnapShots stores current location and redirects after restore.
Stores and restores database tables and files in upload folder.
Automatically logs in current user.
Automatically clears old snapshots with same name.
Small footprint and minimal UI.

Options
All options are defined via constants and can get overwritten with a filter. The format of options is
SNAPSHOTS_[OPTION_NAME]

Best to define your custom option constants in the wp-config.php file.
You can use filters options like
add_filter( 'snapshots_[option_name]', function( $default_option ){
return $my_option;
});

Default Options
// Default save location.
SNAPSHOTS_FOLDER : WP_CONTENT_DIR . '/.snapshots'

// add '--allow-root' to each command if you run the commands as root.
SNAPSHOTS_CLI_ALLOW_ROOT: false

// define the location of your 'wp' binaries.
SNAPSHOTS_CLI_PATH: '/usr/local/bin'

// Number of shots kept with the same name.
SNAPSHOTS_MAX_SHOTS: 2

// SnapShot includes files from content folder.
SNAPSHOTS_SAVE_FILES: true

// SnapShot includes location (URL) during creation to redirect on restore.
SNAPSHOTS_SAVE_LOCATION: true

延伸相關外掛

文章
Filter
Apply Filters
Mastodon