Skip to content

How Rollbacks Work

Understanding how WP Rollback works behind the scenes helps you use it more effectively and troubleshoot any issues that might arise.

The Rollback Process

WP Rollback follows a carefully orchestrated process to ensure safe and reliable rollbacks:

1. Version Detection

  • Scans the WordPress.org repository for available versions
  • Checks compatibility with your WordPress version
  • Verifies the selected version exists and is downloadable

2. Safety Checks

  • Validates current plugin/theme integrity
  • Checks file permissions
  • Ensures sufficient disk space
  • Verifies no critical conflicts exist

3. Version Preservation

  • For premium assets, both free and pro create a zip archive of the current version
  • Stores the archive in the wp-content/uploads/wp-rollback/ directory
  • Pro version provides UI to access and restore these archives
  • Maintains file structure and permissions

4. Download Process

  • Downloads the selected version from WordPress.org
  • Verifies download integrity
  • Extracts files to temporary location

5. Replacement

  • Safely replaces current files with rollback version
  • Preserves configuration and data files
  • Maintains proper file permissions

6. Cleanup

  • Removes temporary files
  • Clears relevant caches
  • Updates WordPress about the version change

Safety Features

Premium Asset Protection

Both free and pro versions preserve premium plugins and themes by creating zip archives before updates. The free version stores these archives but doesn't provide UI access (they're accessible via SFTP). The Pro version adds a user interface to view, manage, and rollback to these archived versions. Note: This does not include database backups.

Important Requirement: Archives are only created when updates occur. WP Rollback (free or pro) must be installed BEFORE an update happens to capture the previous version. Installing WP Rollback after a problematic update won't help - it cannot create archives retroactively.

Integrity Checks

WP Rollback verifies the integrity of both the current installation and the rollback version before proceeding.

Permission Validation

The plugin checks that it has the necessary permissions to modify files before starting the rollback process.

Conflict Detection

Built-in checks help identify potential conflicts that might occur during the rollback process.

What Gets Rolled Back

Plugin Rollbacks

  • Core plugin files
  • Plugin version number
  • Function definitions and classes
  • Admin interfaces and settings pages

Theme Rollbacks

  • Theme template files
  • Stylesheet files
  • Theme functions
  • Theme customization options

What Doesn't Get Rolled Back

  • Plugin/theme settings and configurations
  • User data and content
  • Database entries (unless specifically created by the rolled-back version)
  • Custom modifications outside the plugin/theme directory

Version Sources

WordPress.org Repository

The primary source for free (open source) plugins and themes, providing:

  • Complete version history
  • Verified checksums
  • Compatibility information
  • Release notes

Premium Asset Archives

Both free and pro versions capture premium plugins and themes when they update through WordPress:

  • Archives are created automatically during WordPress updates
  • Stored locally in wp-content/uploads/wp-rollback/
  • Free version: Archives accessible via SFTP
  • Pro version: Provides UI to view, manage, and rollback to archived versions

Note: WP Rollback doesn't connect to external premium marketplaces. It captures versions as they update through WordPress's built-in update system, regardless of their original source (Envato, Kadence Pro, Astra Pro, GeneratePress Pro, Divi, etc.).

Rollback Limitations

Repository Availability

Rollbacks are only possible for versions available in the WordPress.org repository or supported sources.

File Permissions

The web server must have write permissions to the plugin/theme directories.

Disk Space

Sufficient disk space is required for temporary files during the rollback process.

WordPress Core

WP Rollback does not support WordPress core rollbacks due to complexity and security concerns.

Technical Implementation

REST API

WP Rollback uses WordPress REST API endpoints for:

  • Fetching version information
  • Processing rollback requests
  • Managing rollback steps
  • Reporting status and progress

Hook System

The plugin integrates with WordPress hooks for:

  • Adding rollback links to admin pages
  • Registering menu items
  • Handling upgrade processes
  • Managing asset loading

Database Operations

Minimal database operations are performed:

  • Storing rollback metadata
  • Logging rollback activity (Pro version)
  • Caching version information

Best Practices

Before Rolling Back

  1. Create a full site backup
  2. Test on a staging site first
  3. Review version release notes
  4. Check for known compatibility issues

After Rolling Back

  1. Test functionality thoroughly
  2. Monitor for any issues
  3. Consider holding the current version
  4. Document the rollback reason

Next Steps

Released under the GPL-2.0+ License.