• I have WP 2.8.4 and when uploading pictures, it usually ends with Fatal error: Allowed memory size of 16777216 bytes exhausted etc. Only very small pictures upload without error. I tried 2.7 on the same hosting and it works fine, but the problem is, I started with clean installation of 2.8.4 and therefore have no lower version to revert back to.
    I found out I could downgrade to 2.7 just by overwriting the files, but I use multiple Page widgets in my sidebar, which is not possible in 2.7.
    I cannot use .htaccess and the hosting won’t allow more than 16M memory.
    Which means I’m pretty stuck. Is there a way to optimize the uploading stuff in 2.8.4, or rewrite just the image uploading and processing scripts with those from 2.7? Has anyone tried something?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter SelinaK

    (@selinak)

    A 135 kB JPEG (560×500 px) is too big. Small icon or thumbnail sized images upload fine.

    Thread Starter SelinaK

    (@selinak)

    I also have one plugin installed – NextGen Gallery – disabling the plugin helps a bit (I can upload almost all images except a few big ones). But I need the gallery.

    Hi,

    Try with these options:

    -> assign 766 recursive permissions to wp-contents folder.
    -> add this code in htaccess:

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    -> Add this code in htaccess:

    php_value memory_limit 30M
    php_value upload_max_filesize 30M
    php_value post_max_size 30M

    This will increase the memory limit and upload size limit for your blog.

    Thanks,

    Shane G.

    Thread Starter SelinaK

    (@selinak)

    .htaccess is not allowed on my hosting. It always returns the 500 error.

    I was having the same problem.

    It might be theme related. For example I am using the theme irresistable and under miscellaneous the folder showing was wp-content. I changed it to wp-content/uploads and it would not let me upload, despite changing the chmod and messing with ‘save in date based folders’. On a whim changed it back to wp-content and it works now

    As previously mentioned the addition of the .htaccess code can fix this issue. However, some Hosts do not like php settings in the .htaccess for those hosts (1and1.com is one such Host) you need to create a php.ini file inside the wordpress install root. Simply add the following code:

    memory_limit = 32M  ; Maximum amount of memory a script may consume (32MB)
    
    upload_max_filesize = 10M
    post_max_size = 10M

    Make sure that upload_max_filesize and post_max_size are large enough to accommodate the files to be uploaded. It should be noted that memory_limit may need tweaking as well.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cannot upload images in 2.8’ is closed to new replies.