Recursively set directories to 0755 and files to 0644 from the current folder, verify results, and report any misses.
DrGlenn’s Fix Permissions is a small PHP helper you can drop anywhere you need to normalize permissions. It applies the WordPress-friendly defaults—folders 755, files 644—and then performs a verification pass.
fix_permissions.php
) in the folder you want to normalize.https://example.com/fix_permissions.php
) or CLI (php fix_permissions.php
).Place this code in fix_permissions.php
(or a name of your choice) and run it from the directory you wish to normalize.
Loading PHP script…
fix_permissions_code.txt
is present in the same directory as this page.
🚀 Need help fixing your WordPress site?
From infection cleanup to hardening, I can assist.
Visit fixmyhackedwebsite.com for professional WordPress support.
© 2024–2025 DrGlenn. All Rights Reserved.
Disclaimer: This script is provided free of charge without any warranty or claims of fitness. Use at your own risk and as part of a comprehensive security program.