Unable to increase upload limit All-in-one WP migration plugin – Cyberpanel hosted

I am in the process of transferring over a bunch of wordpress sites to my new cyberpanel VPS at Vultr.  One of the most popular plugins for migrating sites is called All-in-one WP Migration.  I’ve used it before and one of the nuances is that they have a built in upload limit when restoring, probably as a way to encourage people to purchased the paid version.  There are multiple posts on-line about how to manually increase the limit – including adjusting the limits in .htaccess or wp-config file

The .htaccess code worked both on my digitalocean droplet with Plesk control panel and a cpanel reseller account:

php_value upload_max_filesize 1024M 
php_value post_max_size 1024M 
php_value memory_limit 512M 
php_value max_execution_time 300 
php_value max_input_time 300

But that wouldn’t work on my cyberpanel account, which kept showing my backup upload limit was restricted to a paltry 2mb.

I tried editing the constants.php file in the plug-in itself, following this advice:

  1. Go to Plugin editor from the left menu panel in the admin dashboard.
  2. Top right, Choose All-in-one WP Migration from the dropdown and click select.
  3. Click on constants.php file.
  4. Search for the word AI1WM_MAX_FILE_SIZE. Change it’s value, refer below code:
    define( ‘AI1WM_MAX_FILE_SIZE’, 2 << 28 );
    To
    define( ‘AI1WM_MAX_FILE_SIZE’, 536870912 * 5 );
    If you even want more than 3 GB then change value from 536870912 * 5 to 536870912 * 10( or any number).
    Don’t forget to update the file.

That made no difference either.  I was left scratching my head wondering if it is something unique to cyberpanel or the way I configured the server when I set it up.

I found that the php installation can have upload limits set.  In order to see if there were limits on my php installation, I created a new file in my home directory called info.php and inserted the following code:

<?php phpinfo(); ?>

and I saw that upload_max_filesize was set to 2mb

I was able to edit the php.ini file through the cyberpanel main interface, selecting php from the left side menu bar, and then edit php configuration.  I selected php 8.0 (which is what the specific domain I was backing up was set to), and just the basic settings (no need for advanced), there were the two things I needed to change – upload_max_filesize and post_max_size making sure they were both larger than the backup file I needed to upload.  It took a few second to save the new settings and then I clicked on “restart php” just to make sure the new settings were in effect.  I reloaded the info.php file I created and it showed the new settings had taken effect.

I went back into All-in-one WP Migration and the upload limit was now updated to what I needed.

I wish things weren’t so complicated, but at least I figured out the problem.

Leave a Reply