Set all files to 644 recursively
fix wordpress file permissions | chmod 644 files only recursively | set files to 644 linux | reset 777 permissions | chmod | find | wordpressCaution: This command changes the system. Understand what it does before you run it.
find /var/www/vhosts/example.com/httpdocs -type f -exec chmod 644 {} +Changes only files, not directories, to 644: the owner can read and write, everyone else can only read. This is the usual target state for PHP files, images and stylesheets. Combined with 755 for directories, it brings a messed-up installation back in order.
Note: Executable scripts (such as shell scripts for cron jobs) lose their x permission. Afterwards, set wp-config.php separately to something more restrictive.
Also searched as
- fix wordpress file permissions
- chmod 644 files only recursively
- set files to 644 linux
- reset 777 permissions