Skip to content

Knowledgebase

Using supported file Undo after an AI Engineer edit

nabwp, ai-engineer

Use the WordPress AI Engineer's supported Undo action to restore a file snapshot from an eligible explicit file edit or write. Check the exact record before using it, because file Undo is narrower than a complete website rollback.

01 Identify the affected edit

Read the activity entry and confirm the website, file path and change you want to reverse. The Engineer retains a limited recent list of file Undo records, up to 40 entries. Do not rely on it as a permanent version-control history or as your only backup.

02 Restore carefully

  1. Stop further edits to the affected file while reviewing the problem.
  2. Check whether you or another process changed the same file after the saved snapshot.
  3. Preserve any later work that must be retained.
  4. Use the Undo action attached to the eligible file change.
  5. Read the result and confirm the intended previous file state was restored, or the newly created file removed where that is the recorded reversal.
  6. Test the website and clear relevant caches if they still display the changed version.

03 Example: protect a later edit before using file Undo

Consider three changes to the same stylesheet. An Engineer snapshot was created before the first edit, and another person later changed a brand colour. Restoring the earlier whole-file snapshot can affect that later work too.

Code or configuration example
09:00: Engineer changes button spacing and records a file snapshot.
09:15: A designer corrects the brand colour in the same file.
09:30: The spacing change needs to be reversed.
Review: compare the current file with the eligible snapshot first.

Preserve the designer’s correction and decide whether a targeted reversal is better than restoring the complete older file. Confirm the Undo record belongs to the selected website and exact file. Shell, database and plugin actions need their own recovery plans even when they happened in the same conversation.

Expected result: The unwanted spacing is reversed while valid newer work is retained. The public page and relevant cache state are checked afterwards, and file Undo is not mistaken for a complete website or database rollback.

Does Undo reverse database or plugin actions?

No. The supported snapshot mechanism covers the Engineer's specific file-edit and file-write operations. It does not provide universal reversal for shell commands, SQL changes, plugin activation or updates, mail, DNS, payments or other hosting actions. Those tasks need an appropriate backup or operation-specific recovery plan.

Why is there no Undo button for a file that changed?

The file may have been changed through a shell command or another tool that does not create this snapshot, or its record may no longer be in the retained history. Review the actual activity rather than assuming every visible file modification has an Undo entry.

What if later edits are important?

Restoring an older snapshot can overwrite those edits. Ask for a targeted reversal of the unwanted lines or use a version-control comparison when available, instead of restoring the entire older file without review.

04 Verify recovery

Repeat the failing action and inspect nearby functions and logs. If the original change also modified the database or external state, restoring the file alone may leave the site inconsistent. Preserve the evidence and ask support to help plan a complete recovery using the relevant files-and-database backup when necessary.

Sources and further reading

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support