Today, I increased the maximum upload file size for WordPress on http://www.jdj. It took more time than expected, and I realized that I never documented my approach on https://jandejongh.eu.
Notes
- Edit
/etc/wordpress/wp-config.php
, and add something like the following near the end:
/* JdJ20230627, following https://www.cloudways.com/blog/increase-media-file-maximum-upload-size-in-wordpress/ */
/* Same solution as on jandejongh.eu */
@ini_set( 'upload_max_size' , '32M' );
@ini_set( 'post_max_size', '32M');
@ini_set( 'memory_limit', '128M' );
- Edit
/etc/php.ini
and modify theupload_max_filesize
andpost_max_size
entries:
; Maximum allowed size for uploaded files.
; https://php.net/upload-max-filesize
; JdJ20230627
; upload_max_filesize = 2M
upload_max_filesize = 32M
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; https://php.net/post-max-size
; JdJ20230627
; post_max_size = 8M
post_max_size = 32M
- Now
# systemctl restart httpd php-fpm
.
- Note that just editing
/etc/wordpress/wp-config.php
, as suggested by many resources on Internet, is not enough for the particular Fedora WordPress deployments.