Skip to content
Tools.Town
290+ free online tools

Real-world workflow

Use Case

Fix WordPress File Permissions After a Migration

Restore safe 755/644 permissions on a WordPress site after a migration or a botched 777 fix — without breaking uploads or updates.

16 August 2026 By Tools.Town Team 5 min read

Target state

PathMode
Directories755
Files644
wp-config.php600 (or 640 if your host requires group read)

Verify what any octal means with the Chmod Calculator before applying it.

Steps

  1. Fix ownership first — most “cannot write” errors are ownership, not mode: chown -R youruser:yourgroup /path/to/site (your host’s panel often has a “reset ownership” button).
  2. Reset directories: find /path/to/site -type d -exec chmod 755 {} +
  3. Reset files: find /path/to/site -type f -exec chmod 644 {} +
  4. Lock the config: chmod 600 wp-config.php
  5. Test an upload in the media library and a plugin update. If either fails, check the PHP process user matches the file owner — do not escalate to 777.
  6. Seeing 403s after the reset? Confirm directories kept their execute bit — decode the current mode in the Chmod Calculator, and check the response code meaning in the HTTP Status Lookup.

Watch out

  • Never run chmod -R 777 — on shared hosting it exposes your files to every other account on the box.
  • Some managed hosts enforce their own scheme; if 755/644 gets reverted, use the host’s permission reset instead.

Frequently Asked Questions

WordPress says it cannot write to wp-content — should I use 777?

No. That error almost always means the files are owned by the wrong user (root or the old host's account). Fix ownership with chown so the PHP user owns wp-content; keep permissions at 755/644.