Let me explain — Until now, I have been using NextGen Gallery, and since I have a redesigned website that has image.php template (gallery attachments page), I would like to use Wordpress' built-in gallery feature instead.

Here's the problem — I can't forever continue to monitor if NextGen Gallery plugin is working as intended on my website, even though my old posts still use it.

Considering that, I would like to import and convert all NextGen galleries into Wordpress galleries.

Is there a way to do this without all the hard work of having to upload gallery-by-gallery, post-by-post (I have close to 250 galleries!)?


Konstantin Kovshenin from Automattic built a small WP plugin hosted here at GitHUB, which does pretty much exactly what you are asking for. It does not seem to solve the whole migration as it works only for [nggallery] shortcodes, but anyone can fork it and add some more lines to solve the rest, right?

| improve this answer | |
  • Can't test it now, but looks like a good one, for a start. – its_me Jan 3 '13 at 6:55
  • 2
    Hi again, I've forked that referred KK's code and bended it to work with [singlepic.. shortcode. It's still WIP so be sure to make a backup (or better try it first on local dev copy of your site). It needs the WP to be patched in case your ngg repo contains any filenames containing spaces (or other funny chars). Yet it does not solve ngg-files embedded w/out ngg shortcode, nor standard featured images. I hope I'll manage to get back to that and tune it up, maybe to build some reasonable plugin on that. Link to repo: escape-ngg-sp – ddhh Jan 17 '13 at 9:18
  • Glad it helped. – ddhh Feb 22 '13 at 6:50

Yes, it is entirely possible (and in fact, I am in the process of doing the same conversion).

  1. Create static Pages for all of your galleries. (Which NextGen should already have created, so this step should be moot.)
  2. Insert the images from each gallery as attachments to that gallery's static page
  3. Force WordPress to regenerate thumbnails for the new attachment images.
  4. Insert the [gallery] shortcode in the static Page content.

Inserting uploaded images as attachments

The tricky part, of course, is Step #2. One option is the Add From Server Plugin, which inserts uploaded files as attachment post-types. If you use this Plugin, simply edit the static Page in question, click the "Upload/Insert" button, and then click the "Add From Server" tab.

Caveat: as far as I know, there is no good way to migrate your image metadata - such as captions - via the Add From Server Plugin, or any other similar method. You will likely have to recreate these data manually.

Regenerating Thumbnails

There are plenty of Plugins to accomplish this step. Just search the Plugin repo for "Regenerate thumbnails"

| improve this answer | |
  • Thanks for trying to help Chip. But this appears to involve (almost) as much manual labor as mentioned in my question. I am glad I have a choice though. Thanks again. :) – its_me Apr 19 '12 at 0:54

If you know sql convert, you can export sql to convert wp_ngg_pictures table's data into wp_posts' format.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.