New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Permissions

How to fix WordPress file permissions

Wrong file permissions cause 403 errors, failed updates, and security holes. WordPress on Linux hosting expects specific chmod values. This tutorial sets safe permissions without opening your site to 777 risks.

Time: 15-30 minutes Level: Beginner

What this problem looks like

The web server must read WordPress files and write only to wp-content/uploads, cache folders, and upgrade directories. Permissions that are too open let attackers modify PHP. Permissions that are too tight break updates and media uploads.

Never chmod 777 on production. Fix ownership so the PHP user owns wp-content while keeping 755/644 on files.

Recursive chmod on the wrong directory can break SSH keys or home folder access on VPS servers. Run commands from the WordPress root only.

Step 1: Standard WordPress permission targets

Directories: 755. Files: 644. wp-config.php: 440 or 600 depending on host. wp-content/uploads must be writable by the web server for media uploads.

  • 755 on wp-admin, wp-includes, wp-content directories.
  • 644 on PHP, CSS, and JS files.
  • 600 or 440 on wp-config.php when supported.

Step 2: Fix permissions via SSH

From the WordPress root:

bash
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 440 wp-config.php
Some managed hosts forbid chmod on wp-config.php. Use their documented value or leave 644 if 440 breaks the site.

Step 3: Fix uploads and upgrade folders

If media upload fails, confirm wp-content/uploads is 755 and owned by the web server user. Plugin updates need write access to wp-content/upgrade temporarily.

Step 4: Resolve ownership issues

On VPS servers, set ownership to the PHP user, often www-data or nginx:

bash
chown -R www-data:www-data /path/to/wordpress

Step 5: Verify updates and uploads work

Upload a test image in Media Library. Run a minor plugin update on staging. If either fails, check host error logs rather than opening permissions to 777.

When to stop DIY and hire help

Permission problems after a hack often hide backdoors in writable directories. BugShield audits file permissions and removes unauthorised PHP at a fixed price.

FAQs

Is 777 ever acceptable?

No on production. It lets any user on shared hosting modify your files. Fix ownership instead.

Why can't WordPress install plugins after migration?

wp-content may be owned by the wrong user from the old host. Ask new hosting to align ownership with the PHP process user.

Should wp-config.php be 400?

400 is ideal if the server still boots WordPress. If the site whitescreens, relax to 440 or 644 per host docs.

Do file permissions affect SEO?

Indirectly. 403 errors and broken assets from wrong permissions hurt crawlability and user experience.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix