How to Increase Maximum Upload File Size in WordPress

There are 4 ways that you can choose to increase the maximum upload file size in WordPress.

1. Use our plugin (easy)

2. Update .htaccess file (hard)

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

upload_max_filesize – set this to a value > than your backup
post_max_size – set this to a value > than your backup
memory_limit – set this to a value > than your backup
max_execution_time – set this to 0 (infinite)

3. Update wp-config.php file (hard)

@ini_set( 'upload_max_filesize' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'memory_limit', '256M' );
@ini_set( 'max_execution_time', '300' );
@ini_set( 'max_input_time', '300' );

upload_max_filesize – set this to a value > than your backup
post_max_size – set this to a value > than your backup
memory_limit – set this to a value > than your backup
max_execution_time – set this to 0 (infinite)

4. Contact hosting provider (medium)

Reach over to the customer support of your hosting provider and ask them to increase these limits for you

If you are still unable to import your file, the easiest way to figure out the problem is to request error logs from your hosting provider for your website. Examine the logs around the time when you tried to import the backup.
You will see what limit you have encountered and increasing it will solve the issue.


  1. Mark Smerdon

    Hi Yani,
    After updating to the latest version and installing the extension for all in one wp migration, it says the maximum file size is 20MB.
    Is this an error in the latest version?

    1. Pim J. Iliev

      Hi Mark,

      In the latest version, file import has been re-added with limits imposed by your server using wp_max_upload_size(). You can check out how to increase the upload limit in the article.

    2. Gavin

      Hello, can I write the code in #3 anywhere in the wp-config.php file?

      Also, on a separate topic, when I updated my page, its contents disappeared. This is why I’m hoping the backup will work. Is this a common problem (page content disappearing after update)?

      1. Yani I

        Yes, you can write it anywhere, but it is good to be around WP_DEBUG statement.
        I have not seen the page content disappearing after update – you might want to report it to Gutenberg project if this is the editor you are using.

  2. Ken

    re: How to Increase Maximum Upload File Size in WordPress

    Are all 4 of the above required (and) or just one of the above (or)?



    I have the Google Drive extension which is supposed to include “Unlimited” file size. I’m now capped at 64MB. Why is this?

  4. Photron

    Is this a typo in item 2?
    `@ini_set( ‘upload_max_size’ , ‘128M’ );`

    Should it be this instead?
    `@ini_set( ‘upload_max_filesize’ , ‘128M’ );`

  5. Mark Dressel

    For the benefit of those struggling with upload limits……

    I recently found that new installs of All-in-one WP Migration were only allowing me a 2mb upload limit whilst previous installs on the same server allowed 520mb uploads.

    The solution to this was not to change any php upload limits but to install the plugin extension at

    Older versions of the migration plugin use a constant set in constants.php which overrides the maximum file limit to allow 520mb. For some reason the latest version of the migration plugin has this constant set but does not use it. The plugin extension restores the use of this constant and will save you a lot of time fiddling with php upload settings.

    1. Christi

      THANK YOU SOOOOOO MUCH!!!! I was pulling my hair out because I couldn’t increase my upload_max_filesize any higher and it still wouldn’t work but I installed the plugin like you said(thanks for the link by the way) and BAM it worked!!

  6. Atje Patatje

    After updating to the latest version and installing the extension for all in one wp migration, it says the maximum file size is 50MB.

    I’ve added upload_max_filesize = 512M in .user.ini. When I load http://domein/info.php it says: upload_max_filesize 512M (local) | 50M (master). Local Value overrules de master value.

    So the settings are correct. Stil i’m getting the message maximum file size is 50MB.

  7. DeeBee

    Hey Yani, I’m trying to upload a websitefile size 234mb to a new hosting provider. Already spoken to them and they have increased my upload file size to 500mb however I keep getting the same error message, maximum file upload size 128mb.
    Is it something I have done wrong?.

    1. Yani I

      Most likely, the hosting did not properly increase the upload limit.
      They have to increase both upload_max_filesize and post_max_size for the page to show proper limit.
      You can also use the file extension that will set it up for you without having to do anything with the code.

  8. Lexi

    This is ridiculous. Surely the limit should be based on the upload_max_filesize, which for most hosts can go up to 1GB, but post_max_size is usually far lower, around 128mb. Which means that individual php.ini files need to be set, which requires me to either have access or walk someone less knowledgeable through the process.
    I often don’t have Cpanel access to the sites I’m transferring to as they’re for white label clients. Suddenly this plugin is unusable for such projects without their admin tinkering :/

  9. George

    Hi, Yani – hope you’re well.

    I’m on the same boat as Lexi.

    I’m in the process of building website templates and then giving customers the import file (.wpress) and a copy of the free All-in-One Migration plugin.

    I just tried to import the content to a blank WordPress site and it says upload limit is 2MB.

    I can’t require from 100ds of customers to buy the Unlimited Extension, just so they can import the website.

    Any chance you revert this specific function to the older version?

    I love your plugin btw.



  10. Sophie

    I own a web design agency and I create my clients’ website on my project center. I need to migration their website after it’s done. If I buy the Premium version, may I use it on all sites I have to migrate or is it just a 1-site licence?

    1. Pim J. Iliev

      Hi Sophie,

      Thank you for getting in touch.
      Could you contact us at support at regarding the premium extension?

  11. Camilo

    Son increibles
    Tuve problema con el .htaccess y con el wp-config pero la extencion me solucionó el problema de limite de carga
    Son increibles, muchas gracias

  12. Asrar

    I want to install its extension but it gives the below message. But i did not install and the max size is only 8mb.

    Installing Plugin from uploaded file: all-in-one-wp-migration-file-extension (1).zip
    Unpacking the package…

    Installing the plugin…

    Destination folder already exists. /storage/ssd2/236/7773236/public_html/wp-content/plugins/all-in-one-wp-migration-file-extension/

    Plugin installation failed.

  13. Pawel

    I have updated .htaccess, wp-config.php file, tried php.ini and even changing line in plugins file. Upload limit is still 128MB.

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

    Any solutions?

  14. Shketo

    Hey Yani,

    I was testing this plugin on a free host and the file upload was throttled to 10mb. I assumed this was due to the nature of the free hosting so attempted to use the plugin on my paid host, and the file upload is limited to 8mb!

    Is this a WP/Plugin error or do I need to contact my host?

    1. Pim J. Iliev

      Hi Shketo,

      Did you try to increase the upload limit or install the File Extension to allow uploading more than 8MB?

    1. Pim J. Iliev

      Hi Alex,

      How large is your backup?
      Which option did you use to increase the upload limit – by using the File Extension or manually adjusting the PHP settings?

  15. Chiranthana Mysore

    Hi, I have used the plugin earlier to download one of my file content which was around 650 mb, as my website was virus hit and everything almost infected, I am planning to upload earlier downladed file tentatively to check if everything is working fine,

    If there is any way can I upload 650 mb file and check if it works or not ?

    Thanks in Advance

  16. Daniel Grossman

    I successfully changed the file upload limit to 256mb but now I’m also getting the “100%” problem – it just hangs there. What can I do about this?

  17. Jochem


    My provider won’t allow higher upload than 96Mb, fixed in their php.ini file.
    Changing the htaccess is resulting in errrors.

    Will the paid version still fix this??
    I doubt…


  18. Stig Ulfsby

    I have increased the maximum file size to 700 MB. I am uploading a file of 520 MB size. It started fine, but hangs on 25.92%. Do I also have to increase the max execution time?

    1. Pim J. Iliev

      Hi Stig,

      To import a 520 MB backup, you will have to modify the PHP settings as follows;
      upload_max_filesize 530M
      post_max_size 530M
      memory_limit 786M
      max_execution_time 1200
      max_input_time 1200

  19. Marien Giraud

    Hi, when I want to export the file generated by all-in-one WP migration to a new site, the maximum upload file size is set to 128 MB.

    When I try to upload my file anyway The error message : “Your file exceeds the maximum upload size for this site : 128MB. How-to: Increase maximum upload file size or Get unlimited”. I suspect the hosting provider of my client to have set this limit and I have no direct way to modify the PHP or .htaccess.

    My question is : If it is my client’s hosting provider that actually did set this limit, will the unlimited version of the plugin fix my issue?

    Thanks for your answer.


    The content of my .htaccess file is:

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress
    # BEGIN LiteSpeed

    SetEnv noabort 1

    # END LiteSpeed

    Where do I have to put the lines?:

    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_value max_input_time 300

  21. Virginia

    I have tried so many times
    I downloaded the extention
    but when I imported my file ( 65MB)
    it alwasy stop at 90% or 96% and just stopped there
    I don’t know what to do

  22. Otso


    php_value upload_max_filesize 530M
    php_value post_max_size 530M
    php_value memory_limit 786M
    php_value max_execution_time 1200
    php_value max_input_time 1200

    Gives me:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

  23. Pim

    I downloaded File Extension (Basic) from this page:,
    Tried several times, but I repeatedly get the comment:

    The package cannot be installed: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

    My all in one WP migration is version 6.8.2

    What to do??

  24. Sirring


    I made a backup of my files with your program All in one. but I didn’t know some issues. and more than 32 MB is not allowed to restore. I did not know files 112 mb … and your files name WPRESS. Any program and php dont accept that.. What i will do. should i upragade?.. i dont have capital can you help me?

  25. Dan B

    I have the Unlimited extension and the Import extension, but I can’t import a 42 Mb file and I also can’t Restore a Backup that I have loaded through FTP. Please help! The new updates have really thrown a wrench in my goto backup/import/restore plugin that I have used for years.

    I am on a GoDaddy server, by the way. Hopefully that doesn’t matter as this plugin has worked fine on the same server for a long time.

  26. Dan


    I have successfully increased my upload size file. Thanks to the instructions.
    However, when I want to import the .wpress file of my site, the loading bar still display “0.00%” even after 15min.
    I therefore stopped once, and reloaded the page to try again.
    But still, importing doesn’t move any further.

    Can you help?
    Ps: my file is 390Mb large.

  27. juan

    My English is not very good but I will try it.

    I have a problem, I’m doing all the steps as indicated, the exported file is 230MB, I can import it without problems but on reaching 100% of the import it stays frozen, that is, they spend hours saying 100%.

    – Is it mandatory that the import have the same domain name?
    export with name:
    import with name:
    Would this be the problem?

    thanks for your reply.

    1. Pim J. Iliev

      Hi Juan,

      No, I do not see any problem migrating from to
      Could you download File Extension (Basic) from this page:, install and let us know if your issue still persists?
      The install instructions, user guide and video instructions can be found here;

      Feel free to contact us at if you need assistance.

  28. chip

    I am using the free version to test. My site is way less than 500 MB’s. I am getting this error.

    Your file exceeds the maximum upload size for this site: 8 MB
    How-to: Increase maximum upload file size or Get unlimited

  29. Mark Hemmingson

    I used the .htaccess method and it was successful. Thanks. Now that the job is done, should I remove that code from my .htaccess file?

  30. eric

    My file is 3.6 GB. I am not very technical when it comes to this. What should I do? Also, Im in a hurry. Thanks

  31. Maan

    It is very useful information about htaccess.
    I found many solutions but none solve my problem unlike the ones listed here. Thank you!

  32. legal dispensary

    i’m seating in my office with a cup of coffee reading your article. i most say its awesome and i am reading this post just at the right time when i needed it. Thanks a lot for this because you did what no other person could do.

  33. seo

    Hello; you have opened a very successful topic. That’s very good that the people getting awareness via your page.
    I have been following your page for a long time and I find it really useful. I am very happy to read the text of valuable people like you. I wish you continued success. Yours truly.

  34. caroline

    Thank you, thank you, thank you! I’ve always used WP All-in-One Migration, but did not know about the extension. Had a site that was 455mb so the extension worked perfectly.

  35. Doctor

    Hi, This post is a very essential post for us. Because we are facing this problem everyday. How work online he/she must need this post. Thank you so much for this post.

  36. Tim Josh

    Hey! Team. Really a well-informative article which clearly explains by increasing maximum upload file size in WordPress. Thanks! for sharing this with us. Keep up the good work.

Leave A Comment?