Set Correct Permissions for WordPress via Shell
You need shell (SSH) access to execute the following commands from the root directory of the WordPress site.
Set directory permissions to 755
Recursively set all directories to 755
permissions (-rwxr-xr-x
):
find /var/www/clients/client23/web62/web -type d -exec chmod 755 {} \;
Set file permissions to 644
Recursively set all files to 644
permissions (-rw-r--r--
):
find /var/www/clients/client23/web62/web -type f -exec chmod 644 {} \;
Note
In the above command, /var/www/clients/client23/web62/web/
is the root directory of the WordPress site in question.
These are the minimum recommended permissions for securing a WordPress installation.