Secure the permissions of wp-config.php
correct wp-config.php permissions | protect wp-config | secure wordpress database password | wp-config 600 or 640 | chmod | wordpress | securityCaution: This command changes the system. Understand what it does before you run it.
chmod 600 /var/www/vhosts/example.com/httpdocs/wp-config.phpRemoves all permissions on wp-config.php for group and others. This works when PHP runs as the file owner, as with Plesk using PHP-FPM or FastCGI, where PHP runs under the subscription user. Afterwards, load the site and check that it still works.
Note: If PHP runs as a different user, for example as an Apache module, a database error appears after setting 600. In that case use 640 with the appropriate group.
Open question before approval: Prüfen, ob 600 bei allen PHP-Handlern in Plesk Obsidian (FPM über Apache, FPM über nginx, FastCGI) zuverlässig funktioniert.
Also searched as
- correct wp-config.php permissions
- protect wp-config
- secure wordpress database password
- wp-config 600 or 640