Skip to content

Instantly share code, notes, and snippets.

@akvedi
Created August 18, 2024 07:16
Show Gist options
  • Save akvedi/8d225e955604472802855dd38c730c21 to your computer and use it in GitHub Desktop.
Save akvedi/8d225e955604472802855dd38c730c21 to your computer and use it in GitHub Desktop.
Trick to restore the backup made with All in one wp migration plugin without a pro subscrption

How to Restore a Backup Using All-in-One WP Migration Without a Pro Subscription

Method 1: Using the Console

  1. Upload the Backup File: Place the .wpress backup file in the wp-content/ai1wm-backups directory of your WordPress installation.
  2. Access the Backup Page: Navigate to the backup page by clicking on the Backup option in the sidebar under the All-in-One WP Migration menu.
  3. Open Developer Tools: Right-click on the page and select "Inspect" to open the developer tools.
  4. Switch to the Console Tab: Click on the "Console" tab within the developer tools.
  5. Paste the Code: Copy the code provided below and paste it into the console.
  6. Execute the Code: Press Alt+Enter or click Run button to run the code.
  7. Start the Restore Process:
    • If there is only one backup file, the restoration will begin automatically.
    • If there are multiple backup files, you will be prompted to enter the filename of the backup you wish to restore.
  8. Enter the Filename: Copy and paste the filename of the desired backup, and the restoration process will commence.

Method 2: Using a Bookmark

  1. Copy the Code: Copy the code provided below.
  2. Create a Bookmark: Right-click on the bookmarks toolbar and select "Add Bookmark."
  3. Name the Bookmark: In the "Name" field, enter "All-in-One WP Trick" or any name you prefer.
  4. Paste the Code: In the "URL" field, paste the code you copied.
  5. Upload the Backup File: Place the .wpress backup file in the wp-content/ai1wm-backups directory.
  6. Access the Backup Page: Navigate to the backup page by clicking on the Backup option in the sidebar under the All-in-One WP Migration menu.
  7. Use the Bookmark: Click on the bookmark you just created.
  8. Start the Restore Process:
    • If there is only one backup file, the restoration will begin automatically.
    • If there are multiple backup files, you will be prompted to enter the filename of the backup you wish to restore.
  9. Enter the Filename: Copy and paste the filename of the desired backup, and the restoration process will commence.
javascript: ( function () { 
    let modelimport = new Ai1wm.Import(); 
    let storage = Ai1wm.Util.random(12); 
    if(document.querySelectorAll(".ai1wm-backup-filename").length == 1){
        let options = Ai1wm.Util.form('#ai1wm-backups-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: document.querySelector(".ai1wm-backup-filename").innerText });
        modelimport.setParams(options); 
        modelimport.start();
    }
    else{
        let filename = prompt("Enter the full name of the file you want to restore").trim();
        if(filename && document.querySelector(`[data-archive="${filename}"]`)){
            let options = Ai1wm.Util.form('#ai1wm-backups-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: filename });
            modelimport.setParams(options); 
            modelimport.start();
        }
        else{
            alert("A correct file name is needed to restore the backup");
        }
    }    
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment