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.


All options are defined via constants and can get overwritten with a filter. The format of options is


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.

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

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

// Number of shots kept with the same name.

// SnapShot includes files from content folder.

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



  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“

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

Snapshots requires the php in your PATH environment!

SnapShots tries to find the php binary on your system. If it can’t find it, you will get this error. You can define the location of your php binary by open your terminal and running


dirname $(which php)

This returns the directory of your php binary. Use this location to define the constant SNAPSHOTS_PHP_PATH in your wp-config.php file. For example:


define( ‘SNAPSHOTS_PHP_PATH’, ‘/usr/local/bin’ );

Don’t include the php binary in the path!

Your Home URLs do not match

Snapshots checks if the home URL of your site matches the one from wp option get home. If they are not equal it often that the DB_HOST variable is not defined correctly. This also happens if you use a socket for your MySql connection (Local WP).

Update your DB_HOST variable in your wp-config.php file to something like this:


define( ‘DB_HOST’, ‘localhost:/tmp/ysql/mysqld.sock’ );

This should not affect the regular usage of your site. If you encounter any problems, You can wrap the statement like so:


if ( defined( ‘WP_CLI’ ) && WP_CLI ) {
define( ‘DB_HOST’, ‘localhost:/tmp/ysql/mysqld.sock’ );
define( ‘DB_HOST’, ‘localhost’ );

Snapshots requires the „exec“ method!

SnapShots uses the PHP exec method to execute the WP CLI commands.


Snapshots requires WP-CLI!

SnapShots requires the WP-CLI to be installed on your system. Please install it and make sure it is available in your PATH environment.


22. febrúar, 2024
When activating this plugin I get an error saying the wp executable doesn’t exist. Now, I don’t have ssh access to my client’s site, but says wp-cli is pre-installed. So either’s documentation is incorrect, or this plugin uses a hardcoded path to the executable which doesn’t match’s installation directory
18. september, 2023
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!
Skoða 2 umsagnir

Þátttakendur & höfundar

“SnapShots&#8221 er opinn hugbúnaður. Eftirfarandi aðilar hafa lagt sitt af mörkum við smíði þessarar viðbótar.


Translate “SnapShots” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Tested up to PHP 8.3
  • fixed: redirects now work with fragments in URLs
  • change: current snapshot names is now stored in the database (not in the localstorage anymore)


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


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


  • store last use snapshots in localstorage


  • Now requires at least PHP 7.0


  • updated usage of CLI commands for better support


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


  • Updated look in the dropdown menu.


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


  • Initial release