Increase WP Upload file size in php.ini

For massive group uploads nothing beats scp’ing a zip/tar file and un-zipping into the uploads folder, but I wanted to enable single file uploads that exceeded the stupid 2M that is the default for wordpress.

First I installed a plugin that probably is not nescessary but it made things a bit easier.

Here is the link:

https://wordpress.org/plugins/upload-max-file-size/

This plugin alone cannot adjust the php.ini file so you have to nano that in the ssh shell.

Here is the path to the php.ini file in a standard Debian based cloud server. This is Debian 10 (Buster)


1
2
$ nano /etc/php/7.3/apache2/php.ini
$
These sweet code snippets come from http://hilite.me/


Output: (Language: PHP | Style: Fruity | http://hilite.me/)

;First section:
;(Line 611)
;;;;;;;;;;;;;;;;;
; Data Handling ;                                                                                                      
;;;;;;;;;;;;;;;;;

;(Line 689)
; 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.
; http://php.net/post-max-size
; Was 8M -Saig0n ---------------------------------------------------------------------------Saig0n-
post_max_size = 1000M


;(Line828)
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;


;(Line842)
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
; WAS 2M -Saig0n---------------------------------------------------------------------------------Saig0n-
upload_max_filesize = 1000M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

Lorem





1
2
$ AAAA
$ BBBB