Enhancing Skills

Bitnami WordPress file max size.

To change the maximum upload file size in WordPress, you can add code to the .htaccess file or wp-config.php file or edit the php.ini file.

It’s not recommended to change the WordPress max upload file size via .htaccess file. Instead, we will focus on a change to the wp-config.php file or the php.ini file.

Here are the steps to increase the maximum upload file size by editing the wp-config.php file:

  1. Login to your WordPress site using FTP or SSH.
  2. Locate the wp-config.php file in the root directory of your WordPress site.
  3. Open the wp-config.php file in a text editor.
  4. Add the below code to increase the maximum upload file size limit:
  5. You can change the file size limit to any value you want by changing the 64M value to your desired file size limit.
  6. Save the wp-config.php file and close it.
@ini_set( 'upload_max_filesize' , '32M' ); 
@ini_set( 'post_max_size', '32M'); 
@ini_set( 'max_execution_time', '300' );

After these changes are made, the maximum upload file size limit should be increased on your WordPress site.

In most cases, PHP settings in the server configuration will override any settings in WordPress or any other application. However, if you have access to modify the PHP configuration on your server, you can increase the upload_max_filesize value in your php.ini file to allow for larger file uploads.

  1. Login to your WordPress site using FTP or SSH.
  2. Locate the php.ini file in the /opt/bitnami/php/etc directory of your WordPress site.
    • If docker-assistant was used, the path is /docker_assistant/wan/{site_name}/wordpress/conf
  3. Open the php.ini file in a text editor.
  4. Add the below code to increase the maximum upload file size limit:
  5. You can change the file size limit to any value you want by changing the 32M value to your desired file size limit.
  6. Save the php.ini file and close it.
  7. Restart your docker container
upload_max_filesize = 32M
post_max_size = 32M

INFO: the post_max_size must be >= to upload_max_filesize.


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.