Automattic / Automattic/wp-super-cache
Updating .htaccess and wp-config.php when protected by a security plugin
- Dominant language
- PHP
- Stars
- 436
- Forks
- 130
- Avg merge
- 15h 11m
- Merged PRs (30d)
- 10
Description
I use iThemes Security (Better WP Security) to protect my sites with a setting the disabled updates to key files, including .htaccess and wp-config.php, both of which are needed for proper caching setup.
When viewing the WPSC advanced settings page, when .htaccess is read-only, there is a notice and the plugin is unable to update the file with any changes.
There are 2 options to make this better:
1. Check file permissions. If required, store the permissions, make the file writable, update the caching rules and then set the permission back to the stored value
2. Check if iThemes Security exists. If it does, call its file updating functions to apply the changes
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the WPSC advanced settings page and trace how updates to .htaccess and wp-config.php are handled when the files are read-only. Compare the two proposed approaches: temporarily restoring permissions or using iThemes Security's file-updating functions. Done means caching rules can be applied without leaving the files with their original protections changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100