Title: &quot;Unexpected error&quot; when uploading
Last modified: August 31, 2016

---

# "Unexpected error" when uploading

 *  Resolved [pigatrix](https://wordpress.org/support/users/pigatrix/)
 * (@pigatrix)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/)
 * Hello,
 * I get the famous “An unexpected error occured. This is most likely due to a server
   misconfiguration.” while uploading. I run the latest version of NextGen Gallery
   and WordPress. An important aspect to mention is that I recently changed the 
   domain of the website. The plugin worked well before.
 * Here’s a list of what I already tried:
    -Editing the permalinks -Reparing and
   optimising the database -Disable other plugins and custom theme -Resetting the
   NextGen Gallery options -Re-installing NextGen Gallery -Making sure the file 
   and directory permissions are correct on the server -Trying to upload small sized
   images -Disabling AdBlock Plus -Making sure that in the NextGen Gallery options,
   the image directory path is correct
 * I’m getting pretty hopeless, is there anything else I could try?
 * Thanks in advance and kind Regards
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254669)
 * [@pigatrix](https://wordpress.org/support/users/pigatrix/) – “Optimizing” the
   database, depending on how aggressively this is done, can cause some serious 
   and potentially unrecoverable issues with NextGEN Gallery, hopefully this is 
   not the case here.
 * Please try our external Reset Tool plugin here: [https://bitbucket.org/photocrati/nextgen-gallery-reset/get/default.zip](https://bitbucket.org/photocrati/nextgen-gallery-reset/get/default.zip)
 * To install and activate, go to Plugins > Add New … Upload Plugin
    To use, go 
   to Tools > NextGEN Gallery Reset
 * We do not offer specific support for the Reset Tool plugin as is but it can help
   in many circumstances, please let us know if it does.
 * Thanks!
 * – Cais.
 *  Thread Starter [pigatrix](https://wordpress.org/support/users/pigatrix/)
 * (@pigatrix)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254672)
 * Cais,
 * The reset tool didn’t seem to solve the problem. Should I delete and reinstal
   the NextGen Gallery?
 * Kind regards,
    Sven
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254673)
 * [@https](https://wordpress.org/support/users/https/)://wordpress.org/support/
   profile/pigatrix – Again, depending on the database “optimization” it may still
   not make any difference but you could always give re-installing a try.
 * You may need to go back to a complete removal of NextGEN Gallery and start over.
   The following might be of use if that is the case:
 * > This process will generally work but we recommend you have a complete fully
   > verified back-up of your site just in case you run into any problems:
   > Use FTP to remove NextGEN Gallery related folders.
   >  Then use something like
   > [http://wordpress.org/plugins/wpdbspringclean/](http://wordpress.org/plugins/wpdbspringclean/)
   > to delete all the ngg tables. Then use something like [http://wordpress.org/plugins/database-peek/](http://wordpress.org/plugins/database-peek/)
   > to search through the remaining tables for NGG references. Then use something
   > like [http://wordpress.org/plugins/edit-any-table/](http://wordpress.org/plugins/edit-any-table/)
   > to delete all of these database entries.
   > Tables typically involved: wp_ngg_*, wp_options, wp_postmeta, and wp_usermeta
 * Thanks!
 * – Cais.
 *  Thread Starter [pigatrix](https://wordpress.org/support/users/pigatrix/)
 * (@pigatrix)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254678)
 * Cais,
 * I did al the steps you described above and after a complete new installation,
   I get the error again.
 * Kind regards,
    Sven
 *  [r_chee](https://wordpress.org/support/users/r_chee/)
 * (@r_chee)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254694)
 * Hi, just to add a bit of weight to your post Sven, I’m having exactly the same
   issue by the sound of it.
 * I can create the Gallery, choose the files to upload and set it away (note I 
   always resize images first so no images are larger than 1mb), each one does the
   upload however shows a warning triangle at the end.
 * Once the batch has finished I get the same error “An unexpected error occured.
   This is most likely due to a server misconfiguration.”
 * The odd thing is this, if I go to do it again, the gallery I have created is 
   not in the drop down list at the top of the add image gallery dropdown. However,
   if I navigate away to the Manage Gallery section I notice that it has created
   a gallery of the same name for each image that failed to upload, each with one
   image in. However clicking in to any of these galleries I just see the image 
   cannot be displayed thumb instead of the image.
 * For example, if I attempt to upload 12 images to a gallery called Gallery 1, 
   the process will fail but I will have created 12 Gallery 1 galleries all with
   one missing image in it. Make sense?
 * I am running the latest version of the Gallery and WordPress. I do already have
   many galleries that still work – so I guess the plug in is still working for 
   the viewer.
 * Hope this ramble helps troubleshoot!
 * Mic
 *  Thread Starter [pigatrix](https://wordpress.org/support/users/pigatrix/)
 * (@pigatrix)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254716)
 * In my case, there aren’t new albums created either.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254720)
 * [@r_chee](https://wordpress.org/support/users/r_chee/) – Please start your own
   topic so we can try to help you with your specific issue on your specific site.
 * See [http://codex.wordpress.org/Forum_Welcome#Where_To_Post](http://codex.wordpress.org/Forum_Welcome#Where_To_Post)
 * Thanks!
 * – Cais.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254721)
 * [@pigatrix](https://wordpress.org/support/users/pigatrix/) – Please send us a
   Bug Report ([http://imagely.com/report-bug/](http://imagely.com/report-bug/) …
   please reference this topic) so we can get a better look under the page at your
   site.
 * Please include as many details as you can about your site and the issue at hand
   so we can move on this as fast as possible.
 * Thanks!
 * – Cais.
 *  Thread Starter [pigatrix](https://wordpress.org/support/users/pigatrix/)
 * (@pigatrix)
 * [10 years ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254742)
 * The problem was that I had an index.html file in my root directory. Deleting 
   or renaming it solved the problem. Many thanks to Cais!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254746)
 * [@pigatrix](https://wordpress.org/support/users/pigatrix/) – Thanks for sharing!
 * – Cais.
 *  [wppipro](https://wordpress.org/support/users/wppipro/)
 * (@wppipro)
 * [10 years ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254762)
 * [@pigatrix](https://wordpress.org/support/users/pigatrix/): GREAT 🙂 Thanks for
   your solution!!! Had an index.html also, but after renaming pictures will be 
   uploaded
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [10 years ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254764)
 * [@wppipro](https://wordpress.org/support/users/wppipro/) – Thanks for sharing!
 * – Cais.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘"Unexpected error" when uploading’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 12 replies
 * 4 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/unexpected-error-when-uploading-1/#post-7254764)
 * Status: resolved