File permissions keep resetting

Hello. File permissions keep resetting on my server and it's affecting how my WordPress caching plugin works. Every time I update permissions (via FTP), it resets and I have to do it again. I'm not sure what is going on. The plugin is WP-Optimze and it keeps losing access to the wpo-cache folder

3 Replies

I would try changing permissions via the command line and see if that keeps the settings the same.

Who are the owner and group of your WP cache files? You may want to make the owner as you and the group as www-data. That has worked for me. Cache plugins are a PITA. Both wp-cache and Wordfence play fast and loose with permissions when they do updates which seems like once a week!

[editorial]
If it were not so much work I'd re-write my sites into either Bootstrap or JamStack and be done with the vicissitudes of CRMs like WordPress.
[/editorial]

What I would do is just turn off the WP cache completely and setup caching on both your webserver and PHP.

Apache: https://httpd.apache.org/docs/2.4/caching.html

nginx: https://www.nginx.com/blog/nginx-caching-guide/

PHP: https://www.eurovps.com/blog/understanding-php-caching/
https://catswhocode.com/phpcache/

You won't have this problem ever again… It's where this function belongs and server/PHP caching probably works better than a plugin that updates every 3 hours.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct