Wordpress: Get Around Upload Limits Using all-in one migration

How to get around upload limits enforced by your PHP server settings when using the all-in one migration Wordpress plugin.

342 views
d

By. Jacob

Edited: 2020-12-09 13:55

One annoying problem with all-in one migration is that it does not handle large file uploads in the free version; it should be possible using JavaScript to handle large files, without having to change server settings, although that is something I have yet to work with myself.

The easiest solution is to update php.ini or create a .htaccess to support large file uploads. I.e.:

upload_max_filesize = 4000M
post_max_size = 4000M

Another way to solve the problem is by first uploading your exported site to the ai1wm-backups directory with an FTP client, such as FileZilla, and then importing the backup from the control panel; but as it turns out, more recent versions of the all-in one migration plugin will not import files that are uploaded like this in the free version.

You do not have to use all-in one migration; you can easily move a site by creating a backup of the database and downloading all of the files.

Read: How to Move a Wordpress Website Manually

Interestingly enough, it is far faster to use all-in one migration than it is to do a manual backup. That is because transferring files over FTP can be slow. FileZilla does support downloading files simultaneously, but this only helps to a certain extent. The process of requesting each file to download is very slow compared to first zipping the entire www folder and just downloading that via FTP.

I am, however, against buying plugins and themes for Wordpress, simply because it can get expensive very quickly if you have to buy every other plugin or feature you are using. In fact, I prefer to avoid third-party plugins entirely on my sites.

If you manage your own server

If you manage your own server on Debian or Ubuntu, you should create a local .conf file in the conf.d directory instead of editing the php.ini directly; doing this will ensure that your changes are not overwritten when updating PHP.

If using PHP-FPM:

nano /etc/php/8.0/fpm/conf.d/10-local.conf

Then simply copy/paste the new settings and save the file.

upload_max_filesize = 4000M
post_max_size = 4000M

A value of 4000M (4GB) is, perhaps, a bit extreme. Nevertheless, I have sometimes had the need to transfer sites that were this large.

Modifying the plugin code

If you are a web-developer, then it is important not to overlook the option of modifying the plugin code. This is something I very rarely do, and in light of other options, such as moving a site manually, I am probably not going to do that myself.

If you do modify the plugin-code to support larger file uploads, remember to rename the plugin to avoid potential conflicts with all-in one migration. There is also the risk, if you do not re-name the plugin, that a careless client might update the plugin and overwrite all of your changes.

The easiest way to add support for large file uploads, again, is to modify the php.ini settings. But, the advantage of doing it from the Plugin code, is that it will only apply to this specific Plugin - depending on where you add it in the code.

ini_set('upload_max_filesize', '4000M');
ini_set('post_max_size', '4000M');

A more complicated solution would be to improve the plugin to allow uploading of large files, without modifying the php.ini settings.

Tell us what you think:

  1. How to properly remove the title from a Wordpress post, and how to do it for specific post types.
  2. There is no function to select a post by slug name (post name), but we can create our own function to do it; find out how in this tutorial.
  3. How to properly customize Wordpress based website, where to add your own code, and how to override existing functionality.
  4. How to manually move a Wordpress website to another domain name, and copy the database and the files from the old site.
  5. Should you use Wordfence or Malcare? And are they even sufficient security tools? Securing a Wordpress site with third party plugins and themes is probably harder than you think.

More in: WordPress Tutorials