wodby / nginx

Nginx docker container image
https://wodby.com/stacks
MIT License
72 stars 51 forks source link

Allow to customize default wp-content and plugins folders in nginx configs in wordpress template #16

Open virtuman opened 5 years ago

virtuman commented 5 years ago

Since the builder for the wordpress allows to customize paths to /wp-content, uploads and plugins folders - it would be great to allow this customization via an additional ENV param as a base path for wp-content and plugin folders. It should also be reflected in the wodby/wordpress and wodby/wordpress-php images

csandanov commented 5 years ago

I'm sorry, what is the builder for wordpress? I never saw WP installation with custom paths, why and how would anyone do this? Please note since we orient on docker images we assume you're using composer to manage WP core and plugins

virtuman commented 5 years ago

an example would be composer.json that can be found in wordpress-composer repo:

https://github.com/wodby/wordpress-composer/blob/master/composer.json#L29-L38

Where you can specify location of plugins, mu-plugins, themes, you can also put wordpress into subfolder, etc., ie:

  "extra": {
    "installer-paths": {
      "web/contents/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
      "web/themes/{$name}/": ["type:wordpress-theme"],
      "web/addons/{$name}/": ["type:wordpress-plugin"]
    },
    "wordpress-install-dir": "web/wp"
  },
csandanov commented 5 years ago

I'm not sure why would anyone do that, what's the value in this? Customizaton for the sake of customization? I don't think this worth supporting. Besides our other WP images also contain hardcode for default paths such as wp-content, wp-content/plugins, wp-content/themes.

csandanov commented 5 years ago

Ok, I see that mu-plugins/ directory is actually a thing. However, we don't have any hardcode for plugins/ dir in WP preset. We do have for wp-content but I'm yet to hear the good reason why rename it.

kallehauge commented 5 years ago

@csandanov there are pretty popular projects around for WordPress that requires changes to some of the paths. The most popular I know is the following: https://roots.io/bedrock/ I guess that researching their "Why" would be a good starting point. I'm not saying you should do it but maybe @virtuman can make a bullet list of why this would be a good feature to support based on the existing projects arguments?