Skip to content

Instantly share code, notes, and snippets.

@xxxdepy
Last active December 17, 2022 19:15
Show Gist options
  • Save xxxdepy/ed2c11d07fb9f39c7dd5ca9f0472028c to your computer and use it in GitHub Desktop.
Save xxxdepy/ed2c11d07fb9f39c7dd5ca9f0472028c to your computer and use it in GitHub Desktop.
Use Restore functionality on All-In One WP Migration without the paid extension

Uploading large files to All-in-One WP Migration *

** without the paid extension

To use this code first upload the .wpress backup file you want to restore in the wp-content > ai1wm-backups folder of the target site, upload it using FTP or a file manager plugin, whichever is easy for you.

Go to the Backups page under the plugin, which is at /wp-admin/admin.php?page=ai1wm_backups

Fire up the Chrome DevTools or dev tools in whichever browser you are using, go to the Console tab and paste the following snippet

var modelimport = new Ai1wm.Import();
var storage = Ai1wm.Util.random(12);
var archive_name = 'REPLACE-WITH-ARCHIVE-NAME';
var options = Ai1wm.Util.form('#ai1wm-backups-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: archive_name});
 
// Set global params
modelimport.setParams(options);
 
// Start import
modelimport.start();

On line 3 paste the name of your backup archive, it looks something like example.com-20221215-205102-pit8or.wpress, you will find it on the backups list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment