Nine years is a hell of a thread necro but it’s relevant, I promise.
It seems the advice from @Benjamin_Owens was incomplete. I found a blog post that covers this issue and it includes a wp-cli command that fixes your existing galleries after making the change:
wp search-replace wp-content/gallery/ gallery/ wp_ngg_gallery --all-tables-with-prefix --include-columns=path
The blog post wasn’t a perfect fix for me but I was able to get through it. The first thing is I needed to just use define()
to set the NGG_GALLERY_ROOT_TYPE
constant rather than Config::define()
.
Secondly, I was changed the gallery path to /app/uploads/gallery
instead of /app/gallery
to better fit with the shared directory setup in Trellis. I did this by defining uploads/gallery/
as the gallery location in NGG’s Other Options page and setting the replacement in the wp-cli command as uploads/gallery/
.
I lost a whole evening to this. I hope to save others the trouble.