
NextGEN Gallery is one of the best, if not THE best image gallery plugins for WordPress. I’ve used it for years on many sites. However I’ve noticed a problem, a bug if you will, that leaves “orphaned” records in the WordPress database. I’ve reported this to Imagely and they’re looking into it.
Using NextGEN Gallery can leave orphaned records in the posts and posts meta database tables, especially if you add and delete galleries often. It appears to me that the orphaned records are created during upload, so if you add images often they will build up over time. I noticed this on a site where I upload hundreds of images a week and started noticing the database backups were extremely large. I started looking for what was causing the huge size of some of the tables and I found the issue.
I created this plugin to clean up the orphaned records. It analyzes the WordPress tables for orphaned records related to NextGEN and in the NextGEN specific tables as well. It then shows you the number of orphans in each specific table. The plugin will clean up these orphaned records (delete), if you click “Clean”.
WARNING – READ THIS!
I assume NO responsibility for any loss of data from using this plugin.
YOU SHOULD MAKE A FULL BACKUP BEFORE USING THE CLEAN FUNCTION, TO ALLOW RECOVERY IF THERE IS A PROBLEM.
It is beyond the scope of this plugin to cover all the information you may need to backup and successfully restore database tables. However I recommend reading my blog post 27 Essential WordPress Plugins: https://www.pqinternet.com/technology/27-essential-wordpress-plugins, and get whatever backup plugin I currently recommend. At the time of writing this sentence, I recommend BackWPup (link in the blog post along with some notes). You can select to backup just the tables this plugin cleans: wp_ngg_album, wp_ngg_gallery, wp_ngg_pictures, wp_posts, wp_postmeta (note that the wp_ prefix may be different on your system). There is also a link in my post to a utility to help import large sql dumps (backups) if they fail.
Read my blog post: Handling Huge MySQL Database Table Exports/Imports/Backups https://www.pqinternet.com/web-site-design-html-css/handling-huge-mysql-database-table-exports-imports-backups
NOTE: The “Analyze” and “Clean” functions can take A LONG TIME to execute, be patient, do not reload the page! The “Clean” function can take a VERY LONG TIME depending on how large and bloated the tables are!
Starting from $0 per month.
Rating
Reviewers
1 reviews
Tags
Developed By
fwblack
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Show Bluesky posts with a Bluesky feed slider that scrolls updates and keeps content visible while keeping visitors engaged.
Offer customers a trusted way to pay using PayPal through a PayPal Button that reduces checkout friction and supports higher sales.
Add a countdown bar to your site to create urgency, highlight limited time offers, and drive faster engagement and higher conversions.
Make it easy for supporters to contribute using PayPal or Stripe by adding a donation button that keeps giving fast, secure, and on site.

Add floating corner pop-ups to share updates, promotions, or messages in a non-intrusive, customizable format.
Capture email leads with an email subscription form that collects addresses, saves entries, sends notifications, and helps grow your audience.
Display social proof avatars that show user activity and ratings, build trust instantly, and help visitors feel confident about your credibility.
Create custom forms with a form builder that offers advanced field types, easy layout control, and flexible options for any purpose.
Use a contact form so visitors can send messages, submit inquiries, and help you collect leads and improve user experience.
Show a GDPR-ready cookie notice that clearly explains how cookies are used, helping you stay compliant while creating a more transparent experience for your visitors.
Use skill flip cards to showcase your abilities in a clear, interactive format that strengthens your profile and improves your chances of getting hired.
Show eBay reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
