All in One Migration Plugin Ext

I guess it was too good to be true.  My favourite All in One WP Migration Plugin has started to fiddle around to get its supporters to sign up for the expensive paid version. Or who knows, maybe I’ve got it wrong. They’re trying to create the impression they’re increasing security.

Tonight when I moved a WordPress site to a new server and wanted to upload a backup, a message appeared that there was a limit of 2MB on the import size that was allowed.  You then get a link that takes you to the plugin author’s Web and it gives you three ways of fixing it – and a paid option.  The first two – editing the wp-admin config file or using .htaccess didn’t work for me.  I then was forced to go for the plugin extension that was provided, but am a little worried as it’s not available on the WordPress site so not audited.  But at least it’s available and it does work.

After Googling the issue I found that as of version 5.68 the authors of the plugin have added a limit to the size one can export and import. The reason being that it would be up to the server provider to increase that limit for WordPress.  The change makes it so that the server rules are followed for the size that can be exported and imported. The plugin author set an official limit of 512MB but the message that came up for me was 2MB limit.

Next thing I Googled the problem and then finally found this solution works best – a plugin extender for the All in One WP Migration tool.  However caution is advised as this plugin does not come from WordPress so means it hasn’t been audited and can be a security risk:
https://import.wp-migration.com/

While I was doing my research I came across a fifth and maybe more secure solution that I may try out in my next attempt – only problem is since the size limit will default with every plugin upgrade, one would have to make this change every time when the plugin is upgraded:
https://hibulletbabu.blogspot.com/2017/0…n-all.html

All you need to do is find this file in:

/wp-content/plugins/all-in-one-wp-migration/constants.php

Open it From your Code Editor.

Find these Lines in it, May be on Line 200.

// =================
// = Max File Size =
// =================
define( ‘AI1WM_MAX_FILE_SIZE’, 536870912 );

Replace it with this:

// =================
// = Max File Size =
// =================
define( ‘AI1WM_MAX_FILE_SIZE’, 5368709120 );

It will increase the size up to 5GB you can also use more then 5GB.

And now save your file.

Now Go to All-In-One Migration >> Import and you will find your MAX Upload size is Changed to 5GB. You can Now also Export file up to 5GB.

Looks as though there is an update to this too:

https://ryankozak.com/all-in-one-migration-sizelimit/

Go ahead and open up /wp-content/plugins/all-in-one-wp-migration/constants.php

Search for “Max File Size” with a simple control + f, and you’ll be directed to the bit of code below.

As of version 6.72, the line that defines the file upload limit is line 289 of constants.php. The 2 << 28 is the php bitwise shift left operation, resulting in 536870912, which is 512MB. You can see the changes made to constants.php between version 6.71 and 6.72 here. These changes aren’t mentioned in the changelog at all, they seem to be an attempt at adding a little “security through obscurity” in order to prevent people from quickly spotting and applying this hack.

// =================
// = Max File Size =
// =================
define( ‘AI1WM_MAX_FILE_SIZE’, 2 << 28 );

Older versions of the plugin (6.71 and below) simply defined the file upload size limit, in bytes, without using the shift operation. Either way though, increasing this limit is extremely easy.

// =================
// = Max File Size =
// =================
define( ‘AI1WM_MAX_FILE_SIZE’, 536870912 );

In order to increase the upload size limit to 4GB, on all versions of the plugin, simply input the number of bytes as the AI1WM_MAX_FILE_SIZE constant. See below

// =================
// = Max File Size =
// =================
define( ‘AI1WM_MAX_FILE_SIZE’, 4294967296 ); // THIS LINE MAKES NEW LIMIT 4GB

For the sake of demonstration, let’s set the limit even higher.

// =================
// = Max File Size =
// =================
define( ‘AI1WM_MAX_FILE_SIZE’, 4294967296 * 10 ); // THIS LINE MAKES NEW LIMIT 40GB

Save the file and navigate back to the “import” function for the All-In-One Migration Plugin. The file upload limit now reads 4GB.