這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

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

螢幕擷圖

安裝方式

  1. Upload snapshosts to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Click on “Click here to create your first Snapshot!” in the admin bar to create your first Snapshot.
  4. Restore the saved snapshot by clicking on the menu entry and confirm.
  5. All tables not used in the current SnapShot with the DB prefix will be removed!

常見問題集

What are the requirements for SnapShots

You need WP CLI installed (at least version 2.2) and PHP must be able to execute external programs with PHPs exec

Does it work without WP CLI?

No, WP CLI is essential here and SnapShots will not work without it. You will not be able to activate the plugin without the addon.

Does it work with “Local by Flywheel”

Yes, the plugin has been tested with the amazing tool from Flywheel and works out of the box.

使用者評論

2023 年 9 月 18 日
This plugin is very usefull when you need to make small modifications during your site development phase. You can very quickly roll back to the previous version of your site. I had some difficulties to get everything working but the developer was very helpfull and provided options on how to solve the problem. Thanks a lot for such a useful plugin!
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈SnapShots〉的開發相關工作。

參與者

將〈SnapShots〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.7.0

  • better error handling
  • keyboard search
  • tested up to 6.1
  • implemented upgrade mechanism for future update routines

2.6.0

  • fixed: Snapshots with numbers are now recognized.
  • moved to external script and styles

2.5.0

  • store last use snapshots in localstorage

2.4

  • Now requires at least PHP 7.0

2.3

  • updated usage of CLI commands for better support

2.2

  • checks for ZIPAchive and falls back to PCLZIP if not available
  • automatically checks the home_url and do a search-replace if necessary

2.1

  • Updated look in the dropdown menu.

2.0

  • Breaking changes: Snapshosts are now stored in a subdirectory.
  • added option to remove snapshots from the UI

1.0

  • Initial release