correct wordpress permissions code example

Example 1: wordpress directory and its permissions

sudo chmod 755 /var/www/html/WEB_DIRECTORY/
sudo chmod 755 /var/www/html/WEB_DIRECTORY/wp-includes
sudo chmod 644 /var/www/html/WEB_DIRECTORY/.htaccess
sudo chmod 644 /var/www/html/WEB_DIRECTORY/wp-admin/index.php
sudo chmod 755 /var/www/html/WEB_DIRECTORY/wp-admin/js/
sudo chmod 755 /var/www/html/WEB_DIRECTORY/wp-content/themes
sudo chmod 755 /var/www/html/WEB_DIRECTORY/wp-content/plugins
sudo chmod 755 /var/www/html/WEB_DIRECTORY/wp-admin
sudo chmod 755 /var/www/html/WEB_DIRECTORY/wp-content
sudo chmod 640 /var/www/html/WEB_DIRECTORY/wp-config.php

Example 2: wordpress file permissions

sudo chmod 755 /var/www/html/
sudo chmod 755 /var/www/html/wp-includes
sudo chmod 644 /var/www/html/.htaccess
sudo chmod 644 /var/www/html/wp-admin/index.php
sudo chmod 755 /var/www/html/wp-admin/js/
sudo chmod 755 /var/www/html/wp-content/themes
sudo chmod 755 /var/www/html/wp-content/plugins
sudo chmod 755 /var/www/html/wp-admin
sudo chmod 755 /var/www/html/wp-content
sudo chmod 640 /var/www/html/wp-config.php

Tags:

Misc Example