How-To Increase PHP File Upload Limit

In this video I will show you how to increase the PHP File Upload limit so that you can upload files larger than the default setting that came with your installation. This is a common issue when setting up WordPress on your own and might be less of an issue if you are on a managed hosting or shared hosting provider where the hosting service may have already configured this item for you. I will show you how to change it if you have your own instance of WordPress on Lightsail and also show how to change this if you are on other hosting methods.

Steps:

  1. Login to your server instance using SSH Terminal
  2. Edit the php.ini file
    1. For Bitnami based installations type: sudo vi /opt/bitnami/php/etc/php.ini
    2. For LAMP based installation setup type: sudo vi /etc/php/7.4/apache2/php.ini
    3. Modify the following properties to your requirements:
      1. post_max_size
      2. upload_max_filesize
      3. max_execution_time
      4. max_input_time
  3. Restart the server instances by running the following command:
    1. For Bitnami installations: sudo /opt/bitnami/ctlscript.sh restart
    2. For LAMP based installations: sudo service apache2 restart and sudo systemctl restart php7.4-fpm.service
  4. Test your changes