Increasing upload limit in php.ini

I would like to launch a wordpress stack with larger upload limits than the default php.ini file provides. In the directory /home/harold/Wordpress on my desktop computer I have two files:

docker-compose.yml contains:

db:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: “MYPASSWORD”

wordpress:
image: wordpress:latest
ports:
- “81:80”
links:
- db:mysql
volumes:
- uploads.ini:/usr/local/etc/php/conf.d/uploads.ini

and uploads.ini contains:

file_uploads = On
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600

Then in that directory I execute:

% export RANCHER_URL=http://192.168.0.3:8080
% export RANCHER_ACCESS_KEY=ABCD3D8C2E66C563C0EF
% export RANCHER_SECRET_KEY=verylongkeyherenoquotationmarks
% rancher-compose up

This creates the stack and successfully starts mysql and wordpress on a host. I am able to configure Wordpress by surfing to http://widgetsRus.com:81

Examining the container, I can see that an empty directory has been created /usr/local/etc/php/conf.d/uploads.ini

How should I do this correctly?

Thanks in advance!

To increase upload size limit you have to go in root directory and find the PHP.ini file. If you not having the file then select option “Show hidden files” then you will see the PHP.ini file. Edit the file and add

*upload_max_filesize = 20M*
*post_max_size = 25M*
*memory_limit = 30M*

Also you can edit .htaccess file and add

php_value upload_max_filesize 20MB
php_value post_max_size 25MB
php_value memory_limit 30MB

There is another method modifying WordPress files. Edit the wp-config.php or functions.php files, and paste the following code

@ini_set( ‘upload_max_size’ , ’20MB’ );
@ini_set( ‘post_max_size’, ’25MB’);
@ini_set( ‘memory_limit’, ’30MB’ );

If you still having problem then I would refer you a guide to increase upload size limit