Fix WordPress – An error occurred in the upload. Please try again later

65
Please wait...
An error occurred in the upload. Please try again later.

If you get this error while uploading image or any media to WordPress you can only suspect some things and start investigation by changing and checking settings one by one.

Good news - WordPress returns exact error message!

Getting error details

Error details are in the HTTP response from async_upload.php script formatted as JSON. You can easily find it using build in Developer Tools in Firefox or Developers Console in Chrome.

  1. In Chrome or Firefox press F12 and go to Network tab.

  2. Try to upload image again or do any other action that will trigger the error.

  3. At the bottom left of Developer Tools/Console find async_upload.php file name and click it.

  4. Go to Preview tab (see attached images). This will show you the error details. Click screenshot below to enlarge.

    Developers Console in Chrome - Click To Enlarge
    Developers Console in Chrome - Click To Enlarge
    Firefox Developer Tools - Click To Enlarge
    Firefox Developer Tools - Click To Enlarge

Fix: Unable to create directory uploads

{"success":false,"data":{"message":"Unable to create directory uploads\/2015\/07. Is its parent directory writable by the server?","filename":"wordpressErrorImageUpload1.png"}}
  1. Check permissions for upload folder. It should have 755 mask.

    Correct WordPress upload folder permissions
    Correct WordPress upload folder permissions

  2. Check upload path. It can change for example when you switch your hosting company. Go to https://your_server/wp-admin/options.php and find upload_path. Check if it is correct.

Fix: This file type is not permitted for security reasons

{"success":false,"data":{"message":"Sorry, this file type is not permitted for security reasons.","filename":"wordpressErrorImageUpload1.pdn"}}

Simple - check extension.

Maybe you are uploading file with the same name but different extension. png and pdn can get mixed up. List of allowed extension can be found here https://codex.wordpress.org/Uploading_Files

Images

  • .jpg
  • .jpeg
  • .png
  • .gif
  • .ico
  • .svg

Documents

  • .pdf (Portable Document Format; Adobe Acrobat)
  • .doc, docx (Microsoft Word Document)
  • .ppt, .pptx, .pps, .ppsx (Microsoft PowerPoint Presentation)
  • .odt (OpenDocument Text Document)
  • .xls, .xlsx (Microsoft Excel Document)
  • .psd (Adobe Photoshop Document)

Audio

  • .mp3
  • .m4a
  • .ogg
  • .wav

Video

  • .mp4
  • .m4v (MPEG-4)
  • .mov (QuickTime)
  • .wmv (Windows Media Video)
  • .avi
  • .mpg
  • .ogv (Ogg)
  • .3gp (3GPP)
  • .3g2 (3GPP2)

65 Comments
  1. James says

    Hi Sebastion,

    When I try upload the image and receive the error, I check the asycn_upload.php file and it says “Failed to load response data” Does that mean it can’t find the database/incorrect path?

    TIA

    1. Sebastian Expert says

      please contact me using form on the page. Then we will take over on email.

  2. Julie says

    Hi Sebastian,

    I’m also getting a similar problem “An error occurred in the upload. Please try again later”

    Below is my preview, please help!

    {“success”:true,”data”:{“id”:109327,”title”:”Phillips2″,”filename”:”Phillips2-6.jpg”,”url”:”http:\/\/www.juliecharlett.com\/wp-content\/uploads\/2018\/10\/Phillips2-6.jpg”,”link”:”http:\/\/www.juliecharlett.com\/?attachment_id=109327″,”alt”:””,”author”:”1″,”description”:””,”caption”:””,”name”:”phillips2-7″,”status”:”inherit”,”uploadedTo”:109230,”date”:1539057654000,”modified”:1539057654000,”menuOrder”:0,”mime”:”image\/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http:\/\/www.juliecharlett.com\/wp-includes\/images\/media\/default.png”,”dateFormatted”:”October 9, 2018″,”nonces”:{“update”:”d0a9447cf2″,”delete”:”cc8552aa6f”,”edit”:”21708c0557″},”editLink”:”http:\/\/www.juliecharlett.com\/wp-admin\/post.php?post=109327&action=edit”,”meta”:false,”authorName”:”julie”,”uploadedToLink”:”http:\/\/www.juliecharlett.com\/wp-admin\/post.php?post=109230&action=edit”,”uploadedToTitle”:”Paige & Randall”,”filesizeInBytes”:671011,”filesizeHumanReadable”:”655 KB”,”context”:””,”height”:560,”width”:840,”orientation”:”landscape”,”sizes”:{“thumbnail”:{“height”:150,”width”:150,”url”:”http:\/\/www.juliecharlett.com\/wp-content\/uploads\/2018\/10\/Phillips2-6-150×150.jpg”,”orientation”:”landscape”},”medium”:{“height”:200,”width”:300,”url”:”http:\/\/www.juliecharlett.com\/wp-content\/uploads\/2018\/10\/Phillips2-6-300×200.jpg”,”orientation”:”landscape”},”full”:{“url”:”http:\/\/www.juliecharlett.com\/wp-content\/uploads\/2018\/10\/Phillips2-6.jpg”,”height”:560,”width”:840,”orientation”:”landscape”}},”compat”:{“item”:””,”meta”:””}}}

    1. Sebastian Expert says

      Please install “Health Check & Troubleshooting” plugin and do “Health Check”. It will show any problems with installation. Propably issue is with ‘loopback connections’.

  3. Archana says

    Hi,
    I am facing the same issue but , my image is uploaded to upload folder successfully, but I am not able to check image inside media, and upload it shows me error “There was an error in the upload. Please try again later.” and after inspecting, async-upload.php it shows me a json format like this::

    {“success”:true,”data”:{“id”:3145,”title”:”new”,”filename”:”new-1.jpg”,”url”:”http:\/\/dhdconsultores.co\/wp-content\/uploads\/2018\/09\/new-1.jpg”,”link”:”http:\/\/dhdconsultores.co\/new-2\/”,”alt”:””,”author”:”1″,”description”:””,”caption”:””,”name”:”new-2″,”status”:”inherit”,”uploadedTo”:0,”date”:1538038994000,”modified”:1538038994000,”menuOrder”:0,”mime”:”image\/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http:\/\/dhdconsultores.co\/wp-includes\/images\/media\/default.png”,”dateFormatted”:”27 septiembre, 2018″,”nonces”:{“update”:”bf338cec0f”,”delete”:”5777c5ae7d”,”edit”:”e7fb0e425f”},”editLink”:”http:\/\/dhdconsultores.co\/wp-admin\/post.php?post=3145&action=edit”,”meta”:false,”authorName”:”hola”,”filesizeInBytes”:77603,”filesizeHumanReadable”:”76 KB”,”context”:””,”height”:700,”width”:950,”orientation”:”landscape”,”sizes”:{“thumbnail”:{“height”:150,”width”:150,”url”:”http:\/\/dhdconsultores.co\/wp-content\/uploads\/2018\/09\/new-1-150×150.jpg”,”orientation”:”landscape”},”medium”:{“height”:221,”width”:300,”url”:”http:\/\/dhdconsultores.co\/wp-content\/uploads\/2018\/09\/new-1-300×221.jpg”,”orientation”:”landscape”},”full”:{“url”:”http:\/\/dhdconsultores.co\/wp-content\/uploads\/2018\/09\/new-1.jpg”,”height”:700,”width”:950,”orientation”:”landscape”}},”compat”:{“item”:”
    \”0\”
    Los campos obligatorios est\u00e1n marcados con *\n\t\t\t\t\t\t\t\t\t\t\t
    Link to Image
    \n\t\t\t
    \n\t\t\n\t\t

    \n\t\t\t \n\t\t\t
    \n\t\t\t\tFiltro de imagen\n\t\t\t\t

    Please help me. why there is a problem in json?

    1. Sebastian Expert says

      the image uploaded successfully. Based on what I saw this ‘error’ (which is not error) is related to ‘loopback connections’ issue. WordPress needs it to work correctly but some hosts have it disabled. I recommend installing “Health Check & Troubleshooting” plugin and do “Health Check”. It will show any problems with installation.

  4. Imran Patel says

    Perfect !!!!!!!!!

    Thank you

  5. Adi Varburg says

    Hi, I have the same issue as well- as ICAN wrote above
    followed all the instructions but there is no error in the preview
    however, I am still having the same message error which seems really strange. When I check for the uploaded file in the uploads folder, it’s there. Besides, the medias dailog isn’t showing any media, it keeps blank all the time even though there’are images in the uploads folder.
    I tried other various solutions, like disabling plugins, upgrading WP and changing folder permission, yet no solutions has worked for me. please help!

    1. Sebastian Expert says

      hi, you would have to contact me using “contact me” page. Then we could proceed further. It is hard to diagnose using comments.

      1. Anne says

        Please I am having the same issues as well.

  6. ican says

    Hey Seb,
    I followed all the instructions above; there’s no issue with the upload because the file is successfuly uploaded; however, I am still having the same message error which seems really strange. When I check for the uploaded file in the uploads folder, it’s there. Besides, the medias dailog isn’t showing any media, it keeps blank all the time even though there’are images in the uploads folder.
    I tried other various solutions, like disabling plugins, upgrading WP and changing folder permission, yet no solutions has worked for me.
    Mate, I need your help.
    Thanks.

    1. Sebastian Expert says

      What exact error message you get? “An error occurred in the upload. Please try again later”? It is returned after upload in response with error code, do you see it?
      You would have to send me the screenshot with the http response or create limited user so I could try uploading myself. You can contact me using “contact” page.

  7. top123 says

    Hi Sebastian. Could you please tell me what’s wrong with my upload. I cannot upload an image via the media button due to this error” sorry, you are not allowed to attach files to this post.” I’ve tried many ways, deactivating plugins and switching to a default theme. The result is same. So this is not related to plugins or theme conflicts for sure. I use this plugin “Sabai Discuss” when I upload the file . This plugin use WordPress Editor. You can download a file to test in your side here https://www.dropbox.com/s/6f29xzz2y6mfleh/sabaidiscuss-1.3.47.zip?dl=0. Even more, I’ve tested the plugin locally with fresh database and wordpress files, only this plugin installed. Still I get the same error. I get this error in my live host,too. There’s nothing wrong with the file permission in the server configuration.

    1. Sebastian Expert says

      hi, since you did all those steps (fresh install, removed other plugins) and problem still persists, it means that the Sabai Discuss does some roles check using its mechanism (ignoring WordPress permission mechanism) and does not allow you to upload file.
      It might be that it allows only admins to attach file (not contributor). To resolve this you will have to contact the plugins author.

  8. Sam says

    Hey,

    Good article – thanks for posting. I followed your instructions and I get a different sort of error though – I get a “WordPress database error:” with a bunch of SQL error code after that. Any ideas?

    1. Sebastian Expert says

      those SQL errors are important. You would have to paste them here. Also, ensure that the database user has correct privileges in DB.

      1. Sam says

        Sure, here are our logs:

        WordPress database error Unknown column ‘post_id’ in ‘field list’ for query SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (32,33,34,35,36,37,38,39,40,46,47,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78) ORDER BY meta_id ASC made by do_action(‘wp_ajax_query-attachments’), WP_Hook->do_action, WP_Hook->apply_filters, wp_ajax_query_attachments, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_postmeta_cache, update_meta_cache
        [25-Jan-2018 00:52:47 UTC] WordPress database error Unknown column ‘post_id’ in ‘field list’ for query SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (79) ORDER BY meta_id ASC made by wp_ajax_upload_attachment, media_handle_upload, wp_insert_attachment, wp_insert_post, update_attached_file, update_post_meta, update_metadata, get_metadata, update_meta_cache
        [25-Jan-2018 00:52:47 UTC] WordPress database error Unknown column ‘meta_id’ in ‘field list’ for query SELECT meta_id FROM wp_postmeta WHERE meta_key = ‘_wp_attached_file’ AND post_id = 79 made by wp_ajax_upload_attachment, media_handle_upload, wp_insert_attachment, wp_insert_post, update_attached_file, update_post_meta, update_metadata
        [25-Jan-2018 00:52:47 UTC] WordPress database error Unknown column ‘post_id’ in ‘field list’ for query INSERT INTO `wp_postmeta` (`post_id`, `meta_key`, `meta_value`) VALUES (79, ‘_wp_attached_file’, ‘2018/01/test-4.jpg’) made by wp_ajax_upload_attachment, media_handle_upload, wp_insert_attachment, wp_insert_post, update_attached_file, update_post_meta, update_metadata, add_metadata
        [25-Jan-2018 00:52:47 UTC] WordPress database error Unknown column ‘post_id’ in ‘field list’ for query SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (79) ORDER BY meta_id ASC made by wp_ajax_upload_attachment, media_handle_upload, wp_update_attachment_metadata, update_post_meta, update_metadata, get_metadata, update_meta_cache
        [25-Jan-2018 00:52:47 UTC] WordPress database error Unknown column ‘meta_id’ in ‘field list’ for query SELECT meta_id FROM wp_postmeta WHERE meta_key = ‘_wp_attachment_metadata’ AND post_id = 79 made by wp_ajax_upload_attachment, media_handle_upload, wp_update_attachment_metadata, update_post_meta, update_metadata
        [25-Jan-2018 00:52:47 UTC] WordPress database error Unknown column ‘post_id’ in ‘field list’ for query INSERT INTO `wp_postmeta` (`post_id`, `meta_key`, `meta_value`) VALUES (79, ‘_wp_attachment_metadata’, ‘a:4:{s:5:\”width\”;i:614;s:6:\”height\”;i:460;s:4:\”file\”;s:18:\”2018/01/test-4.jpg\”;s:10:\”image_meta\”;a:12:{s:8:\”aperture\”;s:1:\”0\”;s:6:\”credit\”;s:0:\”\”;s:6:\”camera\”;s:0:\”\”;s:7:\”caption\”;s:0:\”\”;s:17:\”created_timestamp\”;s:1:\”0\”;s:9:\”copyright\”;s:0:\”\”;s:12:\”focal_length\”;s:1:\”0\”;s:3:\”iso\”;s:1:\”0\”;s:13:\”shutter_speed\”;s:1:\”0\”;s:5:\”title\”;s:0:\”\”;s:11:\”orientation\”;s:1:\”0\”;s:8:\”keywords\”;a:0:{}}}’) made by wp_ajax_upload_attachment, media_handle_upload, wp_update_attachment_metadata, update_post_meta, update_metadata, add_metadata

        1. Sebastian Expert says

          There are two issues:

          • Unknown column ‘post_id’ in ‘field list’ for query SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (32,33,34,35,36,37,38,39,40,46,47,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78) ORDER BY meta_id ASC
          • WordPress database error Unknown column ‘meta_id’ in ‘field list’ for query SELECT meta_id FROM wp_postmeta WHERE meta_key = ‘_wp_attachment_metadata’ AND post_id = 79

          It is strange because based on what I know those two are system fields. Have you done any operations on DB? If you have a backup I would suggest restoring it.
          For backup, I recommend UpdraftPlus Backup/Restore plugin.

  9. MG says

    Hi Sebastian
    Thanks for your post.
    I have the same error.
    here there is the response:

    {“success”:true,”data”:{“id”:112,”title”:”home”,”filename”:”home-4.jpeg”,”url”:”http:\/\/localhost:5035\/wp-content\/uploads\/2018\/01\/home-4.jpeg”,”link”:”http:\/\/localhost:5035\/?attachment_id=112″,”alt”:””,”author”:”1″,”description”:””,”caption”:””,”name”:”home-5″,”status”:”inherit”,”uploadedTo”:46,”date”:1516623918000,”modified”:1516623918000,”menuOrder”:0,”mime”:”image\/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http:\/\/localhost:5035\/wp-includes\/images\/media\/default.png”,”dateFormatted”:”22 enero, 2018″,”nonces”:{“update”:”f8330fc8cf”,”delete”:”baed34adf6″,”edit”:”3a5e777dfb”},”editLink”:”http:\/\/localhost:5035\/wp-admin\/post.php?post=112&action=edit”,”meta”:false,”authorName”:”mario”,”uploadedToLink”:”http:\/\/localhost:5035\/wp-admin\/post.php?post=46&action=edit”,”uploadedToTitle”:”Nam autem reiciendis possimus”,”filesizeInBytes”:5016,”filesizeHumanReadable”:”5 KB”,”context”:””,”height”:225,”width”:225,”orientation”:”landscape”,”sizes”:{“thumbnail”:{“height”:150,”width”:150,”url”:”http:\/\/localhost:5035\/wp-content\/uploads\/2018\/01\/home-4-150×150.jpeg”,”orientation”:”landscape”},”full”:{“url”:”http:\/\/localhost:5035\/wp-content\/uploads\/2018\/01\/home-4.jpeg”,”height”:225,”width”:225,”orientation”:”landscape”}},”compat”:{“item”:””,”meta”:””}}}

    As you can see, it was succesful. In fact, the file is uplodaded. any ideas? the owner of the file is www-data but i dont think that it is the problem.

    1. MG says

      Forgot to mention that all plugins are disabled but defaults.

      1. Sebastian Expert says

        I had similar problem. File was uploaded successfully but it did not show in posts. I had to edit it, rotate, rotate back and save. Then it showed up. To fix this I gave full permissions to _parent_ whole folder where WP installation is. Then I went down with permission until I got it right.

        1. MG says

          That is weird.
          The thing is that when edit the post and add the image, i got the error “An error occurred in the upload. Please try again later.” despite that i got the response shown above and the file is uploaded :/
          I’ll try to find out what the hell is going on.

          1. Sebastian says

            that means that the error happens after the file is uploaded from your computer. What I find helpful is this: https://codex.wordpress.org/Debugging_in_WordPress It shows how to enable logging for wordpress. Maybe this will show more information.

  10. Bruno says

    Hi,
    I have that problem and I dont know how to fix it 🙁
    I have try a lot of tries.. but all without success!
    Can you henp me please??
    Thanks

    1. Sebastian Expert says

      hi, what response do you get from WordPress?

  11. Matt says

    Hi there,
    Is anyone still monitoring this thread? I’m getting the ‘file was only partially uploaded’ error… I’ve tried all the solutions I’ve found and nothing works for me! It only happens with larger files for me (images about 3000 pixels wide, so about 3-5mb). This is a brand new development. All my php settings are fine… high upload limits, and the timeout times are well in excess of when the error pops up. I’ve also tried altering the file.php with the connection: close method… nothing!

    1. Sebastian Expert says

      this article is to show how you can find what the problem is, not how to resolve all of them as there can be a lot of issues with WordPress.
      As for your problem you would have to ask on PHP/WordPress forums. I don’t know your configuration etc. Basically it seems that the issue is with keeping up connection. Maybe you need to change Apache config? try reading this: https://abdussamad.com/archives/169-Apache-optimization:-KeepAlive-On-or-Off.html

  12. victor says

    Amazing post !! that is really helpful content.

    Thanks

  13. Melvin says

    Hi Sebastian, first thanks for this post, i appreciate it. I have the same problem as everybody above and did follow al the steps and this is the response i get:
    console.log(‘Google Map API Key Not Set’);{“success”:true,”data”:{“id”:1940,”title”:”Golondrinas55_BAJA_008″,”filename”:”Golondrinas55_BAJA_008-2.jpg”,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2.jpg”,”link”:”http://gielite.com/property-item/casa-ala-azul-en-golondrinas/golondrinas55_baja_008-4/”,”alt”:””,”author”:”1″,”description”:””,”caption”:””,”name”:”golondrinas55_baja_008-4″,”status”:”inherit”,”uploadedTo”:1817,”date”:1506545060000,”modified”:1506545060000,”menuOrder”:0,”mime”:”image/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http://gielite.com/wp-includes/images/media/default.png”,”dateFormatted”:”September 27, 2017″,”nonces”:{“update”:”e785a3c5ab”,”delete”:”30ecf93880″,”edit”:”f22b6bb72f”},”editLink”:”http://gielite.com/wp-admin/post.php?post=1940&action=edit”,”meta”:false,”authorName”:”webmaster”,”uploadedToLink”:”http://gielite.com/wp-admin/post.php?post=1817&action=edit”,”uploadedToTitle”:”Casa Ala Azul en Golondrinas”,”filesizeInBytes”:99832,”filesizeHumanReadable”:”97 KB”,”height”:533,”width”:800,”orientation”:”landscape”,”sizes”:{“thumbnail”:{“height”:150,”width”:150,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-150×150.jpg”,”orientation”:”landscape”},”medium”:{“height”:200,”width”:300,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-300×200.jpg”,”orientation”:”landscape”},”homeland_property_thumb”:{“height”:115,”width”:153,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-153×115.jpg”,”orientation”:”landscape”},”homeland_property_medium”:{“height”:230,”width”:330,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-330×230.jpg”,”orientation”:”landscape”},”homeland_property_large”:{“height”:407,”width”:709,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-709×407.jpg”,”orientation”:”landscape”},”homeland_property_2cols”:{“height”:350,”width”:520,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-520×350.jpg”,”orientation”:”landscape”},”homeland_property_4cols”:{“height”:230,”width”:240,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-240×230.jpg”,”orientation”:”landscape”},”homeland_news_thumb”:{“height”:70,”width”:70,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-70×70.jpg”,”orientation”:”landscape”},”homeland_widget_property”:{“height”:175,”width”:230,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-230×175.jpg”,”orientation”:”landscape”},”homeland_widget_thumb”:{“height”:50,”width”:50,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-50×50.jpg”,”orientation”:”landscape”},”homeland_header_bg”:{“height”:300,”width”:800,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-800×300.jpg”,”orientation”:”landscape”},”homeland_theme_large”:{“height”:513,”width”:770,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-770×513.jpg”,”orientation”:”landscape”},”homeland_theme_thumb”:{“height”:100,”width”:100,”url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2-100×100.jpg”,”orientation”:”landscape”},”full”:{“url”:”http://gielite.com/wp-content/uploads/2017/09/Golondrinas55_BAJA_008-2.jpg”,”height”:533,”width”:800,”orientation”:”landscape”}},”compat”:{“item”:”Required fields are marked *nttttttttWP SmushntttSmushing in progress..nttn”,”meta”:””}}}

    – Also Existing media files are not showing in the media library,
    – the upload folder permission was set at 777, tried a 744 and now is at 755, none worked!

    Please help, i´m about to pull my hair off!

    1. Sebastian Expert says

      try disabling all plugins. First try smush plugin. It reduces media files size.

  14. Jo says

    Hi, very useful post. My problem is a custom login plugin. If I login via wp-login.php, there’s no any error. It works fine. However, when I login via that custom login page, I get this error. What should I do about this?

    Thanks.

    1. Sebastian Expert says

      contact author of this plugin

  15. priya says

    Hi Sebastian,

    Hope you’re well and thank you for putting the above together.

    I’ve recently moved my wordpress site from a personal hosting package to a business package due to lots of 404 errors (some issue with memory apparently).

    I’ve moved everything across but now images will not upload and I get the “An error occurred in the upload. Please try again later.” Error.

    Using your method above I get the following in the preview tab:

    404 {“success”:true,”data”:{“id”:5867,”title”:”sample-1″,”filename”:”sample-1-4.jpg”,”url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4.jpg”,”link”:”http:\/\/oldfieldparkinfants.co.uk\/2016\/04\/splish-splash-splosh\/sample-1-5\/”,”alt”:””,”author”:”5″,”description”:””,”caption”:””,”name”:”sample-1-5″,”status”:”inherit”,”uploadedTo”:5856,”date”:1461153095000,”modified”:1461153095000,”menuOrder”:0,”mime”:”image\/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http:\/\/oldfieldparkinfants.co.uk\/wp-includes\/images\/media\/default.png”,”dateFormatted”:”20th April 2016″,”nonces”:{“update”:”04d7acada2″,”delete”:”91514faf13″,”edit”:”4a0df2c14f”},”editLink”:”http:\/\/oldfieldparkinfants.co.uk\/wp-admin\/post.php?post=5867&action=edit”,”meta”:false,”authorName”:”Sophia Capetti”,”uploadedToLink”:”http:\/\/oldfieldparkinfants.co.uk\/wp-admin\/post.php?post=5856&action=edit”,”uploadedToTitle”:”Splish Splash Splosh!”,”filesizeInBytes”:32553,”filesizeHumanReadable”:”32 kB”,”sizes”:{“thumbnail”:{“height”:150,”width”:150,”url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4-150×150.jpg”,”orientation”:”landscape”},”medium”:{“height”:225,”width”:300,”url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4-300×225.jpg”,”orientation”:”landscape”},”full”:{“url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4.jpg”,”height”:315,”width”:420,”orientation”:”landscape”}},”height”:315,”width”:420,”orientation”:”landscape”,”compat”:{“item”:””,”meta”:””}}}

    The image looks successful in there even though it doesn’t upload. Also I’m not sure why there is a 404 still there.

    Hope you can help?!
    pls help me for these

    1. Sebastian Expert says

      Sorry for the delay. First to do is to disable all the plugins and try again. You wrote that you moved wordpress, maybe there is a plugin which operates on images (like compressing) after upload which still has old configuration?

  16. Alexander says

    If you have just moved your site to a different folder, then you need to change your folder structure in your settings under general. Save and then try again.

  17. Mohan says

    Hello,

    Help Me.. I am having same problem

    An error occurred in the upload. please try again later. wordpress

    Also Existing media files are not showing in the media library

    1. Sebastian Expert says

      when following the steps in article – what error do you see?

  18. Emmanuel Ngapela says

    Hello Sebastian
    I have the same error except that when I look with the web tool of Firefox there is nothing like error “nothing appears” in the tab “answer”

    Can you help me please?

    1. Sebastian Expert says

      can you contact me using the ‘Contact’ form? I would need to see the screenshot of the Developers Tools with the response from your wordpress.

  19. CAMWP DEV says

    Hi,
    We’re updating the table_prefix of the site and updating the database accordingly. However, we could not upload any files to the Media library anymore. We’ve tried several solutions listed above and also from different blogs, however, none of them are working. Is there any other points we’ve missed?
    Thanks for helping!

    1. Sebastian Expert says

      what error message do you find using browsers development toolbar?

  20. David in Mississippi says

    i get this error a LOT. As in every three days or so.

    My solution is to reboot my computer. It might work to restart the whole browser, but I haven’t tried that.

    Rebooting the computer works every time. Then I can upload images until the error rears its head again.

    David in Mississippi

  21. apurv says

    Hi

    I followed all the steps written here. Post detecting async-upload.php then clicking on ‘Preview’ Tab it is showing ‘The request has no preview available.’

    What should be the solution to this problem?

    1. Sebastian Expert says

      which browser are you using?

  22. Frederick Thiele says

    Hello,

    I get the error message that the image cannot be uploaded when an author tries to upload an image of 512px X 512px or smaller and under 10 kb.
    I tried all suggestions and even my host changed the php.ini settings to the max recommended settings:
    max_execution_time = 90
    max_input_time = 90
    max_input_vars = 3000
    memory_limit = 256M

    The file folder is 755.

    Is there a setting in the PhpMyAdmin that needs to be set? It was working before then all of a sudden it stopped.
    The error only happens when uploading on the front end of the Blog but not on the Question and Answers portion of my website.

    Regards,

    Fred

    1. Sebastian Expert says

      hi, try to give the upload folder the 777 permissions (full) to test if upload works then. If so the permissions are the issue, if now we can move forward.

  23. Adam Hodgson says

    Hi Sebastian,

    Hope you’re well and thank you for putting the above together.

    I’ve recently moved my wordpress site from a personal hosting package to a business package due to lots of 404 errors (some issue with memory apparently).

    I’ve moved everything across but now images will not upload and I get the “An error occurred in the upload. Please try again later.” Error.

    Using your method above I get the following in the preview tab:

    404 {“success”:true,”data”:{“id”:5867,”title”:”sample-1″,”filename”:”sample-1-4.jpg”,”url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4.jpg”,”link”:”http:\/\/oldfieldparkinfants.co.uk\/2016\/04\/splish-splash-splosh\/sample-1-5\/”,”alt”:””,”author”:”5″,”description”:””,”caption”:””,”name”:”sample-1-5″,”status”:”inherit”,”uploadedTo”:5856,”date”:1461153095000,”modified”:1461153095000,”menuOrder”:0,”mime”:”image\/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http:\/\/oldfieldparkinfants.co.uk\/wp-includes\/images\/media\/default.png”,”dateFormatted”:”20th April 2016″,”nonces”:{“update”:”04d7acada2″,”delete”:”91514faf13″,”edit”:”4a0df2c14f”},”editLink”:”http:\/\/oldfieldparkinfants.co.uk\/wp-admin\/post.php?post=5867&action=edit”,”meta”:false,”authorName”:”Sophia Capetti”,”uploadedToLink”:”http:\/\/oldfieldparkinfants.co.uk\/wp-admin\/post.php?post=5856&action=edit”,”uploadedToTitle”:”Splish Splash Splosh!”,”filesizeInBytes”:32553,”filesizeHumanReadable”:”32 kB”,”sizes”:{“thumbnail”:{“height”:150,”width”:150,”url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4-150×150.jpg”,”orientation”:”landscape”},”medium”:{“height”:225,”width”:300,”url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4-300×225.jpg”,”orientation”:”landscape”},”full”:{“url”:”http:\/\/oldfieldparkinfants.co.uk\/wp-content\/uploads\/2016\/04\/sample-1-4.jpg”,”height”:315,”width”:420,”orientation”:”landscape”}},”height”:315,”width”:420,”orientation”:”landscape”,”compat”:{“item”:””,”meta”:””}}}

    The image looks successful in there even though it doesn’t upload. Also I’m not sure why there is a 404 still there.

    Hope you can help?!

    Many thanks,

    Adam

    1. Sebastian Expert says

      hi, just e-mailed you to send me some screenshots.

  24. Leo says

    Hi,
    I have the same issue as Joe, i get no response in the Network tab after an attempted upload.
    I have a successful POST call to async-upload.php but just no response
    Any ideas?
    Thanks

    1. Sebastian Expert says

      hi, you would have to contact me using https://sebastian.expert/contact/ so we can try to figure out why you get no response. If there is no response you could try fiddler, but I think it will show you the same result. In case of any WordPress problem – disabling all plugins and setting temporally default template is a first step to diagnose a problem.

  25. Raghav Raaz says

    Hello
    i am trying but not fix my problem.

    1. Sebastian Expert says

      please use contact form. Maybe we can figure something out.

    2. Pranoy Sinha says

      I have spent a lot of time to fix this. Tried everything as mentioned/suggested in many blogs like activating/deactivating plugins, changing of themes, upgrading / downgrading wordpress versions – but nothing works. Later i solved this issue. Set debug = true in wp-config. In my case i have found DB error in Post table – ID PK – AI was not set. I think it had occurred while migrating DB from one server to another – may be due to MySQL version mismatch. Just alter this table set ID as PK and AI is ON. It will work.

      1. Sebastian Expert says

        thank you for the information. I will update the article and include your comment.

  26. Robert says

    I did what you suggested for the first problem (unable to upload). I am trying to upload an imahge frm my pc to my LOCAL database (using xampp and wordpress), The resulting error message is not clear at all, and is reported here. note: news_maxx_lite is the WP theme downloaded from wp site.
    The image I am trying to upload is only 120kB in size, so the size cannot be the issue. Can you help me?

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘news_maxx_lite_image_size_names_choose’ not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\plugin.php on line 235

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\wordpress\wp-includes\media.php on line 3099
    {“success”:true,”data”:{“id”:12,”title”:”sede”,”filename”:”sede-6.jpg”,”url”:”http:\/\/localhost:10080\/wordpress\/wp-content\/uploads\/2016\/03\/sede-6.jpg”,”link”:”http:\/\/localhost:10080\/wordpress\/sede-7\/”,”alt”:””,”author”:”1″,”description”:””,”caption”:””,”name”:”sede-7″,”status”:”inherit”,”uploadedTo”:0,”date”:1457105087000,”modified”:1457105087000,”menuOrder”:0,”mime”:”image\/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http:\/\/localhost:10080\/wordpress\/wp-includes\/images\/media\/default.png”,”dateFormatted”:”March 4, 2016″,”nonces”:{“update”:”3e43a4e019″,”delete”:”c2893a273d”,”edit”:”f4bf7964c8″},”editLink”:”http:\/\/localhost:10080\/wordpress\/wp-admin\/post.php?post=12&action=edit”,”meta”:false,”authorName”:”robert”,”filesizeInBytes”:121648,”filesizeHumanReadable”:”119 kB”,”sizes”:{“full”:{“url”:”http:\/\/localhost:10080\/wordpress\/wp-content\/uploads\/2016\/03\/sede-6.jpg”,”height”:635,”width”:960,”orientation”:”landscape”}},”height”:635,”width”:960,”orientation”:”landscape”,”compat”:{“item”:””,”meta”:””}}}

    1. Sebastian Expert says

      hey,
      The JSON message states that the upload to WordPress was successful. What failed is a call that uses ‘news_maxx_lite_image_size_names_choose’ which was not found. You should contact theme developer and provide him with that logs.

      What you could do now is try to change theme to WordPress default and then back to news maxx lite. Disable all plugins and see if you get this error. If it does work then enable each plugin along with test if image can be uploaded.

      Sebastian

  27. arnie wellah says

    for me it was the image dimensions. I was attemping to upload images directly from my DSLR @ 5184 × 3456. I reduced the diments by 50% and bingo! uploads working

  28. Asad Ali says

    Hi,

    I am using wordpress 4.2.5 and when I upload image and check the async-upload.php ajax call, the response returned from the server contains the links to uploaded image and all relevant details. However, it also contains the red error message as shown in your post. I believe no errors occur as file can be found on website as attachment and through direct link. Can you please suggest what the cause could be?

    1. Sebastian Expert says

      image can be accessible after upload but if you get error message during upload some properties might not be set correctly. I will email you on the provided email address for further conversation.

      1. Asad Ali says

        Hi, sorry for late reply; was busy in the project.
        I have found the issue.The post I was editing was locked for edit by another user. So, while the image was successfully being uploaded, wordpress was unable to assign it to that particular post. After unlocking the post, everything worked fine.

        Thanks for your help and the above article was really helpful.

  29. Ahsan says

    I am having the same error i am too much stressed due to this error. Please tell me sollution of this problem.

    Regards
    Ahsan Ghias

    1. Sebastian Expert says

      have you tried the steps from the post? What is the error you get in Network tab?

  30. Ashok RAwat says

    Hello,
    An error occurred in the upload. Please try again later.
    http://1.22.26.31:81/ecommerce/wp-admin/post-new.php?post_type=page

  31. Sebastian Expert says

    (as in email)
    Could you send me a screenshot of the response (or lack of it)?
    Also can you send me a screenshot of “headers” tab?

    Sebastian

  32. Joe says

    Hi, trying this but it’s not displaying any responses.

Leave A Reply

Your email address will not be published.