Shravan Kumar Kasagoni

Skip Navigation
How to Increase File Upload Size in AWS Lightsail WordPress Site

How to Increase File Upload Size in AWS Lightsail WordPress Site

 /  Leave a response

Whenever I migrate my WordPress site, I manually export and import the data, images, plugins, settings, etc. This time I have decided to use the All-in-One WP Migration plugin.

After exporting the data, images, plugins, settings using the All-in-One WP Migration plugin from the current site, I went to my new WordPress site and try importing. Here I hit the default file size limit of 40MB, and my exported file size is more than the default limit.

We can increase the file size limit by updating the .htaccess file from WordPress. I am using AWS Lightsail as hosting, which uses the Bitnami WordPress images where By default .htaccess file disabled files for security and performance reasons.

Instead of modifying the .htaccess file, we can php.ini file to increase file upload size in the Bitnami WordPress image. Below are the steps.


sudo cp /opt/bitnami/php/etc/php.ini /opt/bitnami/php/etc/php.ini.backup
sudo vi /opt/bitnami/php/etc/php.ini

Update upload_max_filesize, post_max_size propeties in php.ini file to desired size.


upload_max_filesize=128M
post_max_size=128M

The last step stop and start your servers for change to take effect.


sudo /opt/bitnami/ctlscript.sh stop
sudo /opt/bitnami/ctlscript.sh start

Have a good one!

Write a response

Your email address will not be published. Required fields are marked *

All code will be displayed literally.