# NextGen Plugin Issue Resolved for Bedrock/Sage

**URL:** https://discourse.roots.io/t/nextgen-plugin-issue-resolved-for-bedrock-sage/6012
**Category:** sage
**Created:** 2016-02-23T21:37:38Z
**Posts:** 7
**Showing post:** 7 of 7

## Post 7 by @SnazzyCreative — 2025-04-24T21:53:50Z

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:

> **[Using NextGen Gallery with Bedrock](https://sternerstuff.dev/2019/02/using-nextgen-gallery-with-bedrock/)**
>
> Bedrock from Roots is a modern take on structuring a WordPress website. It leans on Composer to manage all third-party dependencies (WordPress core, plugins, and themes where possible)…

```
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.

---

_[View the full topic](https://discourse.roots.io/t/nextgen-plugin-issue-resolved-for-bedrock-sage/6012)._
