Title: Paths wrong on create gallery because &#8216;gallerypath&#8217; hard coded
Last modified: April 27, 2017

---

# Paths wrong on create gallery because ‘gallerypath’ hard coded

 *  Resolved [ade11](https://wordpress.org/support/users/ade11/)
 * (@ade11)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/paths-wrong-on-create-gallery-because-gallerypath-hard-coded/)
 * As far as I can ascertain, the path for NEW galleries is set thusly;
 * `'gallerypath'=>implode(DIRECTORY_SEPARATOR, array('wp-content', 'uploads', '
   sites', '%BLOG_ID%', 'nggallery')).DIRECTORY_SEPARATOR`
 * In my opinion this is DOING_IT_WRONG, and the correct WordPress way would be 
   to use the function provided for the purpose, **wp_upload_dir()**, the _basedir_
   element of the array returned there gives the real path in use.
 * The problem is we have several large multisites with 100s of sites on each, and
   we still use blogs.dir instead of the newer /uploads/sites/ method. We cannot
   easily change this. Your plugin no longer seems to provide a field to change 
   the path, and I cannot find any filters for these settings either.
 * Could the ‘gallerypath’ options field be re-instated, and also could you use 
   the correct WordPress method instead of hard-coding the path like that?
 * Many thanks!
    -  This topic was modified 9 years, 1 month ago by [ade11](https://wordpress.org/support/users/ade11/).
    -  This topic was modified 9 years, 1 month ago by [ade11](https://wordpress.org/support/users/ade11/).
      Reason: typos, tags

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/paths-wrong-on-create-gallery-because-gallerypath-hard-coded/#post-9078986)
 * [@ade11](https://wordpress.org/support/users/ade11/) – This field should allow
   you to make the changes you need …[http://take.ms/Jx5WM](http://take.ms/Jx5WM)
 * Thanks!
 * – Cais.
 *  Thread Starter [ade11](https://wordpress.org/support/users/ade11/)
 * (@ade11)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/paths-wrong-on-create-gallery-because-gallerypath-hard-coded/#post-9088346)
 * We don’t have the plugin network activated, it is activated as needed per site.
 * How can we access this field without the plugin being network-activated ?
 * Thanks!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/paths-wrong-on-create-gallery-because-gallerypath-hard-coded/#post-9089655)
 * [@ade11](https://wordpress.org/support/users/ade11/) – The plugin should be network
   activated for best results, which includes providing the additional options noted.
 * Thanks!
 * – Cais.
 *  Thread Starter [ade11](https://wordpress.org/support/users/ade11/)
 * (@ade11)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/paths-wrong-on-create-gallery-because-gallerypath-hard-coded/#post-9100727)
 * As per your good suggestion, we temporarily network-activated the plugin to change
   the path, then de-activated it again. We note that network activating your plugin
   also activates it on the top-level site, an unwanted side-effect, so we had to
   go and de-activate it there also.
 * Our network people don’t want us to keep this plugin network activated, on account
   of the number of sites we have, and only a minority want to use NextGEN, and 
   we cannot be certain what other side-effects your code will introduce. It does
   not behave the same as other plugins when they are network activated (viz. the
   above).
 * We do still however feel that hard-coding the uploads path is wrong, note this
   interesting quote from the official WordPress codex here;
    [https://codex.wordpress.org/Determining_Plugin_and_Content_Directories#Multisite](https://codex.wordpress.org/Determining_Plugin_and_Content_Directories#Multisite)
 * > It’s important to remember that WordPress allows users to place their wp-content
   > directory anywhere they want, so you must never assume that plugins will be
   > in wp-content/plugins, or that uploads will be in wp-content/uploads, or that
   > themes will be in wp-content/themes.
 * Thanks for all your help!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/paths-wrong-on-create-gallery-because-gallerypath-hard-coded/#post-9101618)
 * [@ade11](https://wordpress.org/support/users/ade11/) – Thanks for the feedback!
 * – Cais.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Paths wrong on create gallery because ‘gallerypath’ hard coded’ 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/)

## Tags

 * [blogs.dir](https://wordpress.org/support/topic-tag/blogs-dir/)
 * [nextgen](https://wordpress.org/support/topic-tag/nextgen/)
 * [path](https://wordpress.org/support/topic-tag/path/)

 * 5 replies
 * 2 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/paths-wrong-on-create-gallery-because-gallerypath-hard-coded/#post-9101618)
 * Status: resolved