How to decrease the max file upload size without using php.ini or htaccess?

At the top of your wp-config.php file:

ini_set('upload_max_filesize','4M');