worpdress directory correct permisson

chown www-data:www-data  -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--


When it comes to WordPress directories, setting correct permissions is crucial for security and functionality. Here are the recommended permissions for WordPress directories:

  1. wp-admin/: Permissions should be set to 755.
  2. wp-includes/: Permissions should also be set to 755.
  3. wp-content/: This directory contains themes, plugins, uploads, and other user-generated content. Permissions for this directory should be set to 755.
  4. wp-content/themes/: Permissions should be set to 755.
  5. wp-content/plugins/: Permissions should be set to 755.
  6. wp-content/uploads/: Permissions for this directory should be set to 755 or 775, depending on whether you want the web server to have write access (775 allows the web server to write to the directory, which is necessary for file uploads).

These permissions ensure that WordPress can function properly while maintaining security. However, it’s important to note that these are general recommendations and your specific server configuration may require adjustments. Always prioritize security and be cautious about granting unnecessary write permissions to directories.

Published
Categorized as wp