chgrp www-data /var/lib/wordpress/wp-config.php
chmod 660 /var/lib/wordpress/wp-config.php
chgrp www-data /var/lib/wordpress/.htaccess
chmod 664 /var/lib/wordpress/.htaccess
find /var/lib/wordpress/wp-content -exec chgrp www-data {} \;
find /var/lib/wordpress/wp-content -type d -exec chmod 775 {} \;
find /var/lib/wordpress/wp-content -type f -exec chmod 664 {} \;