Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we move default writable paths to the uploads dir? #136

Open
mmcev106 opened this issue Mar 10, 2020 · 5 comments
Open

Should we move default writable paths to the uploads dir? #136

mmcev106 opened this issue Mar 10, 2020 · 5 comments
Assignees

Comments

@mmcev106
Copy link
Contributor

Some WordPress deployments make plugin code read only for the web server user. In my installation I have to manually chmod the cache, error log, and compiled css every time the plugin is updated for my site to work properly. It seems like the appropriate solution would be to place any writable files in either uploads/wp-scss directory, or perhaps wp-content/wp-scss. I considered creating a pull request to accomplish this, but wasn't sure of the preferred way to handle existing files.

@shadoath
Copy link
Collaborator

shadoath commented Feb 8, 2021

@mmcev106 I think this would be a good feature. My preferred method to maintain backward compatibility would be adding a setting that would allow the admin to change the base folder that the scss is loaded from and written to. Currently it is hardcoded into the theme folder.

@shadoath
Copy link
Collaborator

@mmcev106 this was partially updated in 2.1.1. The base dir for both SCSS and CSS files can now be set to the uploads or plugins folders as well as the base theme. The cache folder is still in the plugin but has been committed to repo and should not require creating in the future.
Let me know if this works for you or if you have ideas on how this might be improved.

@mmcev106
Copy link
Contributor Author

Thanks very much @shadoath! Our IT team since wrote a script to update permissions for this plugin as part of the automated update process. I'll mention this in case they want to remove that process now that we have another option.

@shadoath
Copy link
Collaborator

Let me know what else can be done to improve the new base path, I don't think it is at the point I want yet.

@lannyheidbreder-mc
Copy link

I think the cache folder needs to move to uploads as well. I work with a couple of sites on Pantheon hosting; code deployments are done via git, and the only writable folder on the live environment is wp-content/uploads. This means I have to symlink the cache folder to ../../uploads/cache or some such, but this messes up plugin updates.

It generally seems bad for a plugin to modify its own folder; if it's possible to move the cache out of it, I think it should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants