Change log and undo

Most changes made through PowerWP AI are recorded with a snapshot. Roll back one change, a WooCommerce batch, a checkpoint or a work session.

Before PowerWP AI changes your site, it saves how things were and writes the change to a log. By default you can roll a change back for 30 days. A few actions have nothing to restore; they are marked Irreversible. The log is the PowerWP AI › Changes screen. From there, or from your AI app, you can roll a change back. The rollback is recorded too, so it can be rolled back as well.

Four ways back#

Go back toUse it for
One changeThe item you edited wrongly.
A WooCommerce batchA bulk request of up to 100 items.
A checkpointEverything one connection changed after you marked a point.
A work sessionEverything one app did in one sitting.

What is recorded#

What changedLabel on the Changes screenExamples
A fileFileA theme file edited, a file uploaded
A folderDirectoryA folder deleted, an archive extracted, a plugin updated or deleted
A settingOptionwoocommerce_hold_stock_minutes changed
Posts, pages, products, orders, terms, users and similarDatabase rowsA product price, a page text, a coupon
A whole database tableTableA table changed by a larger SQL statement
A plugin switched on or offPlugin stateActivating or deactivating a plugin
The active themeTheme switchSwitching the theme
Text replaced across the databaseSearch & replaceChanging a domain name

Each entry shows the tool, the target, a short summary, which connection made it, when, and a status: Applied, Rolled back, Failed or Pending. A few actions are recorded but cannot be rolled back. They are marked Irreversible, see What can't be undone.

Find a change#

Open PowerWP AI › Changes. You can look at it in three ways: Work sessions, All changes and Checkpoints. In All changes you can search and filter by type, status, source and date.

Select a change to open it. The panel What a rollback restores shows the difference: a line-by-line diff for files and options, and row differences for database changes. It also tells you if the target was modified again after the change.

Roll back one change#

  1. Open PowerWP AI › Changes and choose All changes.
  2. Find the change and select Roll back.
  3. PowerWP AI shows what it will restore. Confirm with Roll back.

The current state is saved first, so the rollback itself can be undone. It appears in the list as "undoes #123" with an Undo button.

Your AI app can do the same. Ask it to look first:

Show me what changed on my site today, then roll back the last change to the "Cast iron skillet" product. Preview it first.

Roll back a WooCommerce batch#

New in 1.5. When an AI app changes many items in one request, for example POST /wc/v3/products/batch, PowerWP AI records every item with its own snapshot and gives the request a batch ID. One rollback undoes the whole request: changed and deleted items come back, created items are removed.

This covers batches of up to 100 items for products, variations, coupons, orders, customers, product categories, tags, shipping classes, attribute terms, reviews and settings. A larger batch stays irreversible, and the change log says why.

To roll a batch back, open one of its changes and choose Roll back the whole batch, or ask your AI app to use changes_rollback with the batch ID from the answer.

Roll back a checkpoint or a work session#

To undo many changes in one step, roll back to a checkpoint or roll back a whole work session. Both go through the changes newest first. See Checkpoints and work sessions.

When a change was modified again#

Before it restores anything, PowerWP AI compares the target with the state right after the change. If it is different, something changed it again: you edited the page by hand, a second AI app changed the same setting, or a plugin saved it. This is a conflict. The rollback stops instead of overwriting that later work.

You then have a choice:

  1. Look at the difference. Open the change in PowerWP AI › Changes, or ask your AI app to run change_details.
  2. If the later edit matters, keep it and fix the rest by hand.
  3. If you want the old state anyway, choose Force rollback. An AI app does this with force: true.

A forced rollback saves the current state first, so it can be undone too.

When you roll back a group of changes, the newer changes of that group are undone first. They do not count as conflicts. Only edits made outside the group do.

When a rollback is not possible#

MessageWhat it means
Already rolled backThe change was undone before.
Cannot be rolled back automaticallyThe change has no snapshot. Restore a backup or fix it by hand.
Snapshot removedThe snapshot is older than the rollback window or was cleared to stay under the storage cap. The log entry stays.

How long snapshots last#

These settings are under Settings › Safety & rollback:

SettingDefaultWhat it does
Rollback window30 daysSnapshots older than this are deleted. Their changes can no longer be rolled back.
Snapshot storage cap2,048 MBWhen snapshots take more room, the oldest are deleted first.
Largest automatic snapshot256 MBFiles, folders and tables above this size are not snapshotted.

A file or folder above the size limit is not changed at all, because PowerWP AI will not change it without a snapshot. A database change can go ahead only if the AI app confirms on purpose that there will be no snapshot. Then it cannot be rolled back.

Who can roll back#

Rolling back through an AI app needs the same permission the original change needed. Read-only mode and the Free plan switch off every write permission, so an AI app cannot roll back then. You can still roll back on the Changes screen as an administrator.

For AI apps: the tools#

ToolWhat it does
changes_listLists recorded changes, newest first. Filters: work_session, batch, tool, type, status, search, mine_only. With sessions: true it lists work sessions and checkpoints instead.
change_detailsShows one change with its diff and whether the target was modified again.
changes_rollbackRolls back one of change_id, checkpoint_id, work_session or batch. Options: dry_run, force, continue_on_error.

Example prompt:

Roll back change 214 as a dry run and tell me if anything was modified since.
↑↓ moveEnter open