Increase WordPress File Upload Limit On AWS

Using a cloud service like Amazon AWS to host our WordPress site is a great idea to help with costs but on occasion we may need to Increase WordPress File Upload Limit On AWS.

What Is The Default WordPress Upload Limit

By default WordPress has a 2mb to 150mb limit depending on our hosting provider. These limits help our hosting provider to limit server timeouts.

Occasionally a low file upload size limit can stop us uploading media or installing larger WordPress plugins, themes or migration / backup files.

Large Files are bad

Not all but some extensive files aren’t a good idea. If your uploading a migration file then that’s great, once we have used it once it’s not needed again again. But if you are uploading your Rocky Horror Show 4K remake, then it will slow down your server. 

How To Check Our File Upload Limit

We can check our limit quickly by opening WP-Admin > Media > Add New

Check File Limit
WP-Admin > Media > Add New

In the lower left of the Drop Files Here box we can see Maximum upload file size: YY MB.

What Is AWS?

Have you heard of The Cloud? It’s a magical place on the internet where we can store and run everything we could ever imagine. Think of it like a buffet of everything on the internet.

AWS is Amazon’s version of the cloud called Amazon Web Services. It’s a hosting provider that can scale up when our business gets bigger. We can run our websites, apps, email servers, illegal file sharing (that’s right Amazon doesn’t check as much as you think).

There is also Microsoft Azure and Google Cloud, plus there are many many others running similar services. We chose AWS because it’s one service we had used little before and felt like a little extra exposure would be fun.

Typically, with cloud providers we get a server that we can do what we want on. We then either pay for what we use EG, how many times the server did something, storage, etc or rent a specific amount of usage.

Alternatives WordPress hosts

We don’t need a magical cloud provider to host WordPress, after testing we have settled on using Ionos. There are many others like GoDaddy, 123Reg, UKFast.

How To Update Our File Limit Size

In WordPress and depending on our hosting provider we can change our file upload size by editing

  • php.ini,
  • functions.php,
  • .htaccess or 
  • using a 3rd party plugin.

If you don’t use AWS check out wpbeginner’s guide on increasing your file limit.

Some hosting providers set a limit in a different place than we stated above. AWS is one of these providers. Still using php.ini but in a slightly different location.

In this recipe, we’ll show you how to easily increase the maximum file upload size in WordPress on AWS.

This isn’t a hack or a workaround, this is a solution Amazon allows you to do but just don’t advertise the fact.

Please follow our WordPress Backup recipe before cooking

Increase WordPress File Limit On AWS

Increase WordPress File Upload Limit On AWS

Sometimes we need to upload a large file on AWS hosted WordPress Installs
Computer Time 15 minutes
Total Time 15 minutes

Equipment

  • WordPress
  • AWS

Ingredients  

  • Website
  • Website

Instructions
 

  • Using a FTP client log into you AWS instance
    Step 1 - FTP on AWS
  • Locate your php.ini file in either
    binphpphpX.X.XX
    or
    opt/bitami/php/etc
    Right click and select View/Edit
    Step 2 - Right click php ini
  • Locate post_max_size change 300M to the limit you require
    For 450 Mb use 450M
    For 20 Mb use 20M
    Step 3 - Edit php ini
  • Log into your Lightsail dashboard and restart your WordPress instance
    https://lightsail.aws.amazon.com/
    Step 4 - Restart AWS Instance

Struggling with the above recipe? Hire a chef to do it for you