Title: [Plugin: nextgen-gallery] Create empty Gallery from php-script
Last modified: August 20, 2016

---

# [Plugin: nextgen-gallery] Create empty Gallery from php-script

 *  Resolved [tricks](https://wordpress.org/support/users/tricks/)
 * (@tricks)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-create-empty-gallery-from-php-script/)
 * Hi,
 * For a website I’m developing I would like to be able to create a new empty gallery
   by means of a php-function which returns the new gallery ID. Something like:
 * `$galleryID = createEmptyGallery();`
 * Is this possible?
 * Thanks in advance,
 * Patrick

Viewing 1 replies (of 1 total)

 *  Thread Starter [tricks](https://wordpress.org/support/users/tricks/)
 * (@tricks)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-create-empty-gallery-from-php-script/#post-2264460)
 * Found it:
 * `$gallery_id = nggdb::add_gallery($galleryTitle);`

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: nextgen-gallery] Create empty Gallery from php-script’ 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/)

 * 1 reply
 * 1 participant
 * Last reply from: [tricks](https://wordpress.org/support/users/tricks/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-create-empty-gallery-from-php-script/#post-2264460)
 * Status: resolved