Nextgen WordPress plugin on Windows server

WordPress is fantastic and Nextgen plugin makes it even more useful. Installing Nextgen plugin was painless but then it didn’t work. Trying to create galleries, it would create folders on the server but then return with “No content found.” After turning on debug mode in wordpress, I found the problem is actually with the MySQL server.

WordPress database error: [Failed to read auto-increment value from storage engine]
INSERT INTO wp_ngg_gallery (name, slug, path, title, galdesc, pageid, previewpic, author) VALUES (‘testgallery’, ‘testgallery’, ‘wp-content/gallery/testgallery’, ‘testgallery’, ”, 0, 0, 1)

It turns out there is a bug in MySQL 5.5 and the default InnoDB table table created by Nexgen’s install script won’t fly.

The solution?

Deactivate the plugin, drop the already created tables and make new MyISAM ones.

DROP TABLE `wp_ngg_gallery`;
DROP TABLE `wp_ngg_album`;
DROP TABLE `wp_ngg_pictures`;
CREATE TABLE `wp_ngg_gallery` (
`gid` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`path` mediumtext,
`title` mediumtext,
`galdesc` mediumtext,
`pageid` bigint(20) NOT NULL DEFAULT '0',
`previewpic` bigint(20) NOT NULL DEFAULT '0',
`author` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`gid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `wp_ngg_album` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`previewpic` bigint(20) NOT NULL DEFAULT '0',
`albumdesc` mediumtext,
`sortorder` longtext NOT NULL,
`pageid` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `wp_ngg_pictures` (
`pid` bigint(20) NOT NULL AUTO_INCREMENT,
`image_slug` varchar(255) NOT NULL,
`post_id` bigint(20) NOT NULL DEFAULT '0',
`galleryid` bigint(20) NOT NULL DEFAULT '0',
`filename` varchar(255) NOT NULL,
`description` mediumtext,
`alttext` mediumtext,
`imagedate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`exclude` tinyint(4) DEFAULT '0',
`sortorder` bigint(20) NOT NULL DEFAULT '0',
`meta_data` longtext,
PRIMARY KEY (`pid`),
KEY `post_id` (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>