WordPress File Upload Size Limit
By default, WordPress will not allow you to upload a file larger than 2Mb. This limit is not set by WordPress itself, but by detaul PHP configuration. This configuration file is usually /etc/php.ini, but normally your Web hosting provider will not let you modify this file. Below is a possible fix you can try. Before running the commands, edit the path (wpdir variable) for correctly reflect your WordPress installation directory.
#!/bin/ksh wpdir=$(echo "${HOME}/public_html") if [ -f ${wpdir}/php.ini ] then cp -p ${wpdir}/php.ini ${wpdir}/php.ini.`date +'%Y-%m-%d_%H-%M'` egrep -v "upload_max_filesize|post_max_size" ${wpdir}/php.ini > ${HOME}/php.tmp mv ${HOME}/php.tmp ${wpdir}/php.ini fi cat >> ${wpdir}/php.ini << EOF upload_max_filesize = 100M; post_max_size = 100M; EOF if [ -f ${wpdir}/wp-admin/php.ini ] then cp -p ${wpdir}/wp-admin/php.ini ${wpdir}/wp-admin/php.ini.`date +'%Y-%m-%d_%H-%M'` rm ${wpdir}/wp-admin/php.ini fi ln -s ${wpdir}/php.ini ${wpdir}/wp-admin/php.ini
This will add two lines to your current php.ini file (or create one, if you don’t have it). This will be an “add-on” php.ini file that will work together with the main php.ini to which you have no access.
Popularity: 3% [?]




