Home>Support>Error uploading media (images)

Error uploading media (images)

I am about to pull my hair out trying to resolve this problem that hit suddenly (yesterday). Yesterday, I migrated my entire WordPress site to a new dedicated server (actually the web host kindly moved it for me), and everything is working perfectly… except, I am getting the following error on most of the images that I try to upload into the media library via wp-admin: ” Error 201504021939.png An error occurred in the upload. Please try again later. ”

My upload maximum is set at 60MB, so that isn’t an issue. Occasionally get an image to upload, but I haven’t been able to identify a pattern yet. The image sizes vary and they are all .png or .jpg. I was on live chat with hosting support for about 4 hours last night. One support rep insisted that it was a plugin conflict. However, I deactivated all of my plugins this morning, and reactivated them one at a time. I got the media upload error every time.

I do not have a URL to share with this thread, because there is nothing to see. I am just curious to know if there are any php/database settings that I (or the web host) could be over looking? Again, all of this started the same day as the migration to the new server.

Ideas? I’m hoping someone has seen this problem and successfully resolved it.

Chris

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Hi Chris

    File permissions? Worth a try:

    http://www.wpbeginner.com/wp-tutorials/how-to-fix-image-upload-issue-in-wordpress/

  2. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Let us know how you come along. We’re back on again tomorrow. Hope you’re able to resolve.

  3. 9 years, 5 months ago Chris Robbins

    Andrew,

    The permissions were all set properly. I’ve been working for hours upon hours chatting with my webhost (they have been extremely helpful), and they confirm the permissions are normal. We are unable to figure out the problem. It may be pure coincidence that I migrated to a new, dedicated server the day all of these problems began; however, deactivating all of my plugins also cures the problem.

    The difficulty arises when I begin to reactivate the plugins one at a time… I activate one plugin, the media uploads work as expected. Then, I activate another plugin and the media uploads stop working. If I deactivate that plugin, leaving only the first, the media uploads still do not work. Therefore, isolating the problem plugin has been impossible. It’s as if there is a script conflict or a memory/php issue that they can’t identify. Some images will upload, but most will not. My upload limit is set at 60M, so file size isn’t the problem; but I am wondering if resolution could be the problem. This is very frustrating, but it seems a lot of people are discussing the issue in wordpress threads.

    Question I am pondering: I did upgrade my Vantage theme a few days ago… could there be an issue in there or a conflict with my child theme?

  4. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Phew tough one! The child theme, or Vantage as a whole, that’s the easiest test to run. To test if the child theme is the problem, switch back to the parent theme and test with it activated. You could also test Vantage by switching temporarily to a default theme like Twenty Fifteen and seeing if the problems persist.

    Perhaps we might also try upping your memory limit in your wp-config.php file to 256 if that hasn’t been done already:

    define('WP_MEMORY_LIMIT', '256M');

    That line can be used in your wp-config.php file which is located in your WordPress root. It should be inserted just before the comment that reads:

    /* That's all, stop editing! Happy blogging. */

    Has this already been done? Or perhaps your hosts just increased your memory limit via your php.ini file which they have access too. Perhaps you can ask them. The plugin problem sounds like a memory issue, as you turn more plugins on, memory on this new server or package is depleted…causing a media upload issue. Wow, that’s a big freestyle on my part but worth checking.

  5. 9 years, 5 months ago Chris Robbins

    Andrew,

    After 3 days on live chat with web support, I was able to resolve it myself. I kept asking them if there were any memory issues with php, and I kept getting “no”. I was told to disable all of my plugins, etc. However, I resolved the issue on my own tonight, with extremely limited technical knowledge. It was a simple fix. Your suggestion above regarding the memory issue led me to look in my php configurations and I increased the Core memory_limit from 40M to 60M. That resolved the issue and now my images upload flawlessly. Granted, I have absolutely no idea what that does, but it worked. I don’t even know if the 60M is sufficient, or if I will have to increase it even more. My media upload max file size is also set at 60M. Do you think I should leave the core memory limit at 60M or should it go higher? I’m on a dedicated server, so I don’t have to worry about taking resources from anyone else. I suppose I could set it at -1 (no limit), but I’m not sure what the drawbacks of that might be (if any). Clearly I have one or more plugins that are memory hogs or poorly scripted.

  6. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Super, glad you were able to resolve. Sorry to hear about the time cost. Yes, I think you can increase memory to 256.

    Maximum allowed image upload and the memory allocation we’re discussing are different, so they don’t need to be the same.

  7. 9 years, 5 months ago Chris Robbins

    btw, I did try to specify memory in wp-config as you suggested, but that didn’t do anything. I had to modify the php.ini, but it’s working now. I appreciate your help.

  8. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Ahh right. Thanks for sharing that little step. Good to know!

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More