Backups and migrations

Increase the upload limit in All-in-One WP Migration

Reviewed on 5 min read WordPress migrations

When you import a large backup with All-in-One WP Migration, the plugin warns you that the .wpress file exceeds the maximum upload size. That cap is not set by the plugin: it is the one PHP has configured on your hosting (upload_max_filesize and post_max_size), and you can raise it yourself.

Before you start, check the maximum size shown in All-in-One WP Migration > Import and compare it with your .wpress file. Also make sure you have enough free space in the account for the file and for extracting it (roughly twice its size).

Option 1: from the cPanel PHP selector

  1. Log in to cPanel and open Select PHP Version.
  2. Click the Options tab.
  3. Change these values:
    • upload_max_filesize: the highest available or, at the very least, a little more than the size of the .wpress.
    • post_max_size: equal to or greater than upload_max_filesize.
    • memory_limit: 512M is usually enough for the import.
    • max_execution_time and max_input_time: 3000.
  4. Changes are saved automatically. Reload All-in-One WP Migration > Import and check that the maximum size has changed.

These options apply to every website in the account that uses that PHP version. When you finish the import, you can set them back to their previous values.

Option 2: from the .htaccess file

If you would rather the change only affected that WordPress, edit the .htaccess file in the installation's main folder (usually public_html/). You can do this from the cPanel File Manager (turn on "Show Hidden Files" in Settings) or over FTP. If it does not exist, create it.

Add these lines at the beginning of the file:

php_value upload_max_filesize 10G
php_value post_max_size 10G
php_value memory_limit 512M
php_value max_execution_time 3000
php_value max_input_time 3000
  • upload_max_filesize and post_max_size: maximum size of the file you can upload. 10G leaves room for backups of several GB; adjust it if your backup is larger.
  • memory_limit: memory available to the import process.
  • max_execution_time and max_input_time: maximum time in seconds, so that a long import is not cut off.

Save the file and reload the import screen: the maximum size should show the new value.

If the website returns a 500 error after you save, that server does not accept php_value in .htaccess. Remove the lines and instead use a .user.ini file in the same folder, with this content:

upload_max_filesize = 10G
post_max_size = 10G
memory_limit = 512M
max_execution_time = 3000
max_input_time = 3000

The .user.ini file can take a few minutes to apply. When you finish the import, delete these lines to go back to the normal values.

If it still fails

  • The maximum size does not change: check that you have changed the PHP version that domain uses (in Select PHP Version or in MultiPHP Manager) and that you have edited the .htaccess in the folder where WordPress is, not another one.
  • The upload reaches 100% but the restore fails: the limit is no longer the problem. Check that there is free space in the account and that the .wpress is not damaged (export it again from the source).
  • The upload stalls or returns a 413 error: if the domain goes through Cloudflare or another proxy, that service has its own upload limits, which do not appear on the plugin's screen. Temporarily turn off the proxy for the domain while you import.

Importing a backup completely replaces the database, media, plugins and themes of the destination WordPress. If that WordPress already has content you want to keep, make a backup first.

To move a whole website step by step, see also how to migrate WordPress to another hosting provider.

You may also find useful

Something wrong or out of date? Tell us and we will review it.