What matters first: WordPress attempted to read, create, rename or include a path and the operating system refused. The exact path and operation matter more than a generic 755/644 recommendation.
What this symptom actually tells you
This can follow migrations, root-run deployments, container volume changes or security hardening. Recursive chmod may mask ownership errors and expose writable code.
Capture evidence before changing anything
- Record the exact path, function and operation from the warning or fatal error.
- Identify the effective PHP-FPM user and the file owner, group and ACL.
- Check whether the filesystem or container mount is read-only.
- Compare a neighbouring working file or directory created by WordPress.
Most common causes
- Wrong owner: Files were copied or extracted by root or another deployment user.
- Missing group access: The PHP user is not in the group expected by the deployment model.
- Read-only mount: The container or network filesystem intentionally prevents writes.
- Security policy: ACL, SELinux, AppArmor or hosting rules override Unix mode bits.
Safe diagnostic and repair sequence
- Restore the documented ownership model rather than broadening every permission.
- Make only required runtime directories writable; keep plugin, theme and core code read-only where possible.
- Apply ACL or group strategy consistently so the next deployment does not reverse the fix.
- Re-run the exact write or include operation and inspect the resulting owner.
How to choose between the likely causes
Do not treat Wrong owner and Missing group access as interchangeable. Files were copied or extracted by root or another deployment user. By contrast, the PHP user is not in the group expected by the deployment model. Use two checks to separate them: Record the exact path, function and operation from the warning or fatal error; and identify the effective PHP-FPM user and the file owner, group and ACL. Those observations usually show whether the next safe move is to restore the documented ownership model rather than broadening every permission or to preserve the current state and widen the investigation.
On a production WordPress site, repeat the failing request while checking a known-good page and the admin area. A fault isolated to one route calls for a narrower rollback than a failure affecting PHP, the database or every request. Record the exact timestamp, affected URL or transaction, last known good state and every change made during diagnosis. That handover is often what separates a repeatable repair from a temporary disappearance of the symptom.
What not to do
Never apply chmod -R 777 to WordPress. It creates a writable-code surface and often leaves the actual owner mismatch unresolved.
How to verify the repair
- The original file operation succeeds under the intended PHP user.
- New files receive the correct owner and group automatically.
- Code directories are not more writable than the deployment requires.
A visible symptom disappearing is not enough. Close the incident only when the original failing action, the surrounding business journey and the relevant logs all agree that the fault is gone.
WP REPAIR INCIDENT STANDARD
Reconstruct the incident before fixing it
This can follow migrations, root-run deployments, container volume changes or security hardening. Recursive chmod may mask ownership errors and expose writable code.
- 1
Record the exact path, function and operation from the warning or fatal error.
- 2
Identify the effective PHP-FPM user and the file owner, group and ACL.
- 3
Check whether the filesystem or container mount is read-only.
- 4
Compare a neighbouring working file or directory created by WordPress.
What must be verified
- The original file operation succeeds under the intended PHP user.
- New files receive the correct owner and group automatically.
- Code directories are not more writable than the deployment requires.
Official technical sources
Continue the diagnosis
This guide explains the diagnosis. If the site is affected now, the intervention should preserve a rollback path and verify the real business journey.
See the emergency repair service →ABOUT THIS SYMPTOM
Frequently asked questions about this guide.
Is running chmod -R 777 a reasonable quick fix for this error?+
No. Recursive chmod 777 creates a writable-code surface and often fails to resolve the actual issue, since the real problem is frequently wrong ownership rather than restrictive permission bits. Restoring the correct owner is the safer and more effective fix.
Could this error appear even if the file permissions look completely correct?+
Yes. ACLs, SELinux, AppArmor, or hosting-level security policy can override standard Unix mode bits and block access even when the visible permissions look fine. Checking these policy layers is necessary when ownership and mode bits don't explain the failure.
Why would this start happening right after a migration or deployment that didn't touch permissions?+
Files copied or extracted by root or a different deployment user can leave the wrong owner in place, which a migration process wouldn't necessarily flag as an error. Comparing the failing path against a neighboring working file created by WordPress itself helps confirm an ownership mismatch.
Does a read-only filesystem or container mount produce the same symptom as a permissions problem?+
Yes, and it needs a different fix. A read-only mount intentionally prevents writes regardless of ownership or mode bits, so no amount of chmod or chown will resolve it — only making that specific runtime directory writable, while keeping code directories read-only, addresses this case.