Bitnami WordPress file max size.
May 6th, 2023 5:17 PM Mr. Q Categories: Config
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:
- Login to your WordPress site using FTP or SSH.
- Locate the
wp-config.php
file in the root directory of your WordPress site. - Open the
wp-config.php
file in a text editor. - Add the below code to increase the maximum upload file size limit:
- You can change the file size limit to any value you want by changing the
64M
value to your desired file size limit. - 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.
- Login to your WordPress site using FTP or SSH.
- 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
- Open the
file in a text editor.php.ini
- Add the below code to increase the maximum upload file size limit:
- You can change the file size limit to any value you want by changing the
32M
value to your desired file size limit. - Save the
file and close it.php.ini
- Restart your docker container
upload_max_filesize = 32M
post_max_size = 32M
INFO: the post_max_size must be >= to upload_max_filesize.