Undo a change to a file with file history

files, editor, history, versions, undo, restore, backup, bak · 0 found this helpful

When you save a file in the control panel's code editor, Barbrick keeps the version you replaced. If a change breaks your site, you can see exactly what changed and put the earlier version back in a few seconds. This works for any file you edit in the panel, such as wp-config.php, .htaccess or a theme's functions.php.

What gets kept

When Every time you save a file in the editor, and every time you restore a version
How long 30 days, or the last 30 versions of each file, whichever is longer
Where A private folder in your account, outside your public folders. Visitors can't download it
Size Files up to 2 MB. Larger files, such as database exports, aren't kept
Space Up to 200 MB for your whole account. When it fills, the oldest versions are cleared first

Versions count toward your storage. File history is a quick undo for edits made in the panel. It doesn't replace Backups, which cover every file, database and mailbox, including changes made over FTP or by your apps.

Compare and restore a version

  1. Go to Account → Hosting → your site → Files and click the file's name to open it in the editor.
  2. Click History at the top of the editor. The list shows each saved version with its date, who saved it and its size.
  3. Click Compare next to a version. You'll see what changed between that version and the file as it is now. Removed lines are red and added lines are green. Click Side by side to see the two versions next to each other.
  4. To put that version back, click Restore, then Restore again to confirm.
The History page comparing an earlier version of wp-config.php with the current file

The file changes on your site straight away. The version you replaced goes into the list first, marked Before a restore, so you can undo the restore the same way.

You can also open a file's history from its own page: File history. Click Open in the editor there to edit the file.

Tip: Before a big edit to wp-config.php or .htaccess, save once without changes. That marks a clean starting point in the list.

Move older backup copies out of your public folders

The panel's earlier editor saved a copy beside the file each time you saved, with a name like wp-config.php.bak-20261120-101500. Those copies sit in your public folders, so anyone who guesses the name can download them. A copy of wp-config.php holds your database password.

When the panel finds copies like these, a notice appears at the top of History.

  1. Click Show the files to see the copies it found.
  2. Click Move to History, then Move to History again to confirm.
The notice offering to move older backup copies into file history

Each copy becomes an earlier version of its file, dated when it was made, and leaves your public folders. Nothing moves until you click. Copies over 2 MB stay where they are; delete them in Files if you don't need them.

If something goes wrong

What you see What to do
No earlier versions yet The file hasn't been saved in the editor since file history started. Changes made over FTP, by WordPress or by plugins aren't kept here. Use Backups to get an older copy
That version is no longer available It was cleared after 30 days or to keep your account under its space limit. Restore the file from Backups instead
The file is too large to compare Files over 2 MB can't be compared in the browser. You can still restore a version
Your site still shows the old content after a restore Clear your site's cache, then reload. For WordPress, purge LiteSpeed Cache

Was this helpful?

Still stuck? Ask us and we'll walk you through it.