Support » Fixing WordPress » Increase upload file size

  • I am using WordPress 3.01 installed on a unix server with redhat el5. It is running the apache server. I’ve changed my php.ini file to memory_limit=96M, post_max_size=64M, upload_max_filesize=64M . I still get message in WordPress saying “Maximum upload file size: 1MB”. If I try to proceed with the upload I will get this error message ‘This file exceeds the maximum upload size for this site.’ the filesize of the file I am trying to upload is 2.89MB. It seems that there must be a wordpress setting or file that I need to update. The question is where, which one? Any help or suggestions appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • did you run a php info on your install to ensure your php.ini settings stuck?

    I’ve edited the wrong php.ini file before….

    otherwise you can do edits in either .htaccess or in wp-config to raise limits, but check your php limits first

    I did check my php.ini file and the new settings did stick. I’ve even tried adding this to my .htaccess file:
    php_value upload_max_filesize 20M
    php_value post_max_size 20M php_value max_execution_time 200
    php_value max_input_time 200

    Neither has had an impact. I looked at the wp-config file but do not see where I would increase the upload limit at. Perphaps another location?

    define(‘WP_MEMORY_LIMIT’, ’64M’);

    added to wp-config.php helps some

    also, I didn’t mean checking the php.ini, I meant running a php info file….. to look at your actual server settings and see if its working

    define(‘WP_MEMORY_LIMIT’, ’64M’);
    in the wp-config.php file did not work either.

    Sorry for my wording about “checking my php.ini file”. I did it both ways, I ssh’d to the server and looked directly at the file as well as from a browser where I ran phpinfo.php. The increased values I expected are there.

    It’s not enough to only update upload_max_filesize, you also need to update post_max_size and possibly max_execution_time, max_input_time and memory_limit. post_max_size should be larger than upload_max_filesize. e.g.,

    post_max_size = 41M
    upload_max_filesize = 40M
    memory_limit = 128M
    max_execution_time = 200
    max_input_time = 200

    Depending on your host, you may also need to clear some caches. For example, on Dreamhost you have to restart FastCGI —

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Increase upload file size’ is closed to new replies.