How can the php.ini file be edited to change settings like max_upload_filesize in PHP?

To edit the php.ini file to change settings like max_upload_filesize in PHP, you need to locate the php.ini file on your server and open it in a text editor. Look for the line that sets the max_upload_filesize parameter and adjust the value to your desired limit. Save the changes and restart your web server for the new settings to take effect.

; Maximum allowed size for uploaded files.
upload_max_filesize = 20M