Wordpress Gallery not sorting


When I have more than approx. 25 images in my Wordpress (version 2.8.6) gallery, it does not sort properly.

The order column will normally increment by one, but it starts to repeat the previous number: i.e. 25, 26, 27, 28, 29, 29, 29, 29

I can re-order an image to how it should be, but after I save the changes and re-open gallery, the changes have not been saved and it reverts back to the muddled order.

I have read somewhere a while ago that it could be a PHP memory issue. Does anyone have any solutions for this?

I am on a shared web host and I also using the Lightbox Gallery plugin (Even after disabling this plugin, the issue remains so I know that its not the plugin).

I have posted a thread on the Wordpress.org forums but I have received no reply? Really puzzled why it is that Im receiving this issue but no-one else seems to be reporting anything similar.


I am running WordPress 2.9.1 and have a large gallery on the following page that has no issues. The gallery was even bigger than it is now.


Also the image edit feature is really cool in 2.9, great way to force WordPress to use a particular part of the image for the thumbnail.

Im really happy for you ryanglobal… I do realise that my problem appears to be an isolated one. Does anyone have any ideas as to what could be the source of the problem. I increased the php memory_limit from 32M to 128M and that didnt fix it either.

I know this is an old thread, but I registered here to indicate I have the exact same problem. Once I click “save all changes” to a wordpress gallery (2.9.2) with more than 25 images, they re-order themselves such that the highest number in the list is 25 and there are thirteen of those numbered 25, thirteen numbered 24, fourteen numbered 23, fourteen numbered 22, etc. all the way down to #19, below which there is only one image per number. I have 91 images uploaded to this gallery.

Will keep searching for a solution…

Hi haus,

I think I can save you the same headaches I had in solving this problem.

After contacting my webhosting provider it appeared that they had no session.save_path listed by default.

So within a php.ini file, I placed:

session.save_path = “/tmp”

Hope that helps!

Thank you! I’ll try it. I did find someone else who submitted this as a bug in WordPress with the exact same symptoms. I’m also exploring other plugins at the moment…

edit: does not work for me. I’ll use another gallery plugin.