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

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)

80 thoughts on “Fix WordPress – An error occurred in the upload. Please try again later”

  1. {“success”:true,”data”:{“id”:73,”title”:”dylan-sauerwein-qwyytY_Iguk-unsplash”,”filename”:”dylan-sauerwein-qwyytY_Iguk-unsplash-6-scaled.jpg”,”url”:”http:\/\/localhost\/AsimSite\/wp-content\/uploads\/2021\/09\/dylan-sauerwein-qwyytY_Iguk-unsplash-6-scaled.jpg”,”link”:”http:\/\/localhost\/AsimSite\/home\/dylan-sauerwein-qwyyty_iguk-unsplash-7\/”,”alt”:””,”author”:”1″,”description”:””,”caption”:””,”name”:”dylan-sauerwein-qwyyty_iguk-unsplash-7″,”status”:”inherit”,”uploadedTo”:12,”date”:1632226261000,”modified”:1632226261000,”menuOrder”:0,”mime”:”image\/jpeg”,”type”:”image”,”subtype”:”jpeg”,”icon”:”http:\/\/localhost\/AsimSite\/wp-includes\/images\/media\/default.png”,”dateFormatted”:”September 21, 2021″,”nonces”:{“update”:”c5ee2443f0″,”delete”:”ded45a02f8″,”edit”:”451c30df31″},”editLink”:”http:\/\/localhost\/AsimSite\/wp-admin\/post.php?post=73&action=edit”,”meta”:false,”authorName”:”asim”,”authorLink”:”http:\/\/localhost\/AsimSite\/wp-admin\/profile.php”,”uploadedToTitle”:”ASIM KHAN”,”uploadedToLink”:”http:\/\/localhost\/AsimSite\/wp-admin\/post.php?post=12&action=edit”,”filesizeInBytes”:411363,”filesizeHumanReadable”:”402 KB”,”context”:””,”originalImageURL”:”http:\/\/localhost\/AsimSite\/wp-content\/uploads\/2021\/09\/dylan-sauerwein-qwyytY_Iguk-unsplash-6.jpg”,”originalImageName”:”dylan-sauerwein-qwyytY_Iguk-unsplash-6.jpg”,”height”:2560,”width”:1696,”orientation”:”portrait”,”sizes”:{“thumbnail”:{“height”:150,”width”:150,”url”:”http:\/\/localhost\/AsimSite\/wp-content\/uploads\/2021\/09\/dylan-sauerwein-qwyytY_Iguk-unsplash-6-150×150.jpg”,”orientation”:”landscape”},”medium”:{“height”:300,”width”:199,”url”:”http:\/\/localhost\/AsimSite\/wp-content\/uploads\/2021\/09\/dylan-sauerwein-qwyytY_Iguk-unsplash-6-199×300.jpg”,”orientation”:”portrait”},”large”:{“height”:1024,”width”:678,”url”:”http:\/\/localhost\/AsimSite\/wp-content\/uploads\/2021\/09\/dylan-sauerwein-qwyytY_Iguk-unsplash-6-678×1024.jpg”,”orientation”:”portrait”},”full”:{“url”:”http:\/\/localhost\/AsimSite\/wp-content\/uploads\/2021\/09\/dylan-sauerwein-qwyytY_Iguk-unsplash-6-scaled.jpg”,”height”:2560,”width”:1696,”orientation”:”portrait”}},”compat”:{“item”:””,”meta”:””}}}

    the picture is uploading to the root file for uploads but it gives error on localhost WP and i have confirmed that it isn’t permission error, plugin, Json and size so can you help me.

    Reply
  2. hi Sebastian , thanks for your greate tutorial I know it is for long time ago, but I have problem recently with uploading file, afer uploading i get the error something happened , please try again later and in network tap for async-upload.php the response is : this request has no response data available.
    but the file will be uploaded to host and will be save to database wp_post table with id 0 and guid empty!
    I appriciate any suggestion how to solve it

    Reply
  3. Hi Sebastian,

    Can you try helping me with this problem? I did the steps you mentioned and the preview tab shows:

    {“success”:true,”data”:{“id”:214870,”title”:”65035-ricardolucas-deputadodistrital-logo-menu”,”filename”:”65035-ricardolucas-deputadodistrital-logo-menu.png”,”url”:”http:\/\/finissimo.com.br\/wp-content\/uploads\/2019\/03\/65035-ricardolucas-deputadodistrital-logo-menu.png”,”link”:”http:\/\/finissimo.com.br\/2019\/03\/26\/cinecult\/65035-ricardolucas-deputadodistrital-logo-menu\/”,”alt”:””,”author”:”1″,”description”:””,”caption”:””,”name”:”65035-ricardolucas-deputadodistrital-logo-menu”,”status”:”inherit”,”uploadedTo”:214706,”date”:1553654572000,”modified”:1553654572000,”menuOrder”:0,”mime”:”image\/png”,”type”:”image”,”subtype”:”png”,”icon”:”http:\/\/finissimo.com.br\/wp-includes\/images\/crystal\/default.png”,”dateFormatted”:”26.03.2019″,”nonces”:{“update”:”7379eb82b5″,”delete”:”09497433a4″},”editLink”:”http:\/\/finissimo.com.br\/wp-admin\/post.php?post=214870&action=edit”,”sizes”:{“full”:{“height”:109,”width”:130,”url”:”http:\/\/finissimo.com.br\/wp-content\/uploads\/2019\/03\/65035-ricardolucas-deputadodistrital-logo-menu.png”,”orientation”:”landscape”}},”height”:109,”width”:130,”orientation”:”landscape”,”compat”:{“item”:””,”meta”:”
    Update Image Sizes\”\””}}}

    It seems the end of the response is broken. The result is the message “Error in Upload – Try again later” and no picture neither the rest of the post media being displayed. Maybe you have an idea of what is the problem. Thank you

    Reply
    • The response suggests that upload was successful. You can see the pictures new URL and date. The error must be on the client side. If you don’t see imags maybe there is a JS error… I suggest that you check Console for any JS errors. Also switch between List and Grid view in Media Library.

      Reply
  4. 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?

    Reply
  5. Hi Sebastian!
    I did what you said, and the message from the console is: Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    This is only happening with one image. I’ve also noticed, that the images are uploaded in the uploads folder, but they are not showing up in the back end: I only get http error.

    Can you please help me?
    Thanks

    Reply
  6. 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

    Reply
  7. 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”:””}}}

    Reply
  8. 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?

    Reply
    • 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.

      Reply
  9. 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!

    Reply
  10. 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.

    Reply
    • 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.

      Reply
  11. 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.

    Reply
    • 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.

      Reply
  12. 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?

    Reply
      • 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

        Reply
        • 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.

          Reply
  13. 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.

    Reply
      • 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.

        Reply
        • 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.

          Reply
  14. 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

    Reply
  15. 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!

    Reply
  16. 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!

    Reply
  17. 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.

    Reply
  18. 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

    Reply
    • 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?

      Reply
  19. 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.

    Reply
  20. 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

    Reply
  21. 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!

    Reply
  22. 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

    Reply
  23. 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?

    Reply
  24. 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

    Reply
  25. 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

    Reply
  26. 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

    Reply
    • 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.

      Reply
    • 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.

      Reply
  27. 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”:””}}}

    Reply
    • 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

      Reply
  28. 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

    Reply
  29. 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?

    Reply
      • 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.

        Reply

Leave a Comment