Skip to content

Instantly share code, notes, and snippets.

@richardevcom
Last active January 21, 2025 12:37
Show Gist options
  • Select an option

  • Save richardevcom/7a98f152bc240fdfc8959d83ac239b4c to your computer and use it in GitHub Desktop.

Select an option

Save richardevcom/7a98f152bc240fdfc8959d83ac239b4c to your computer and use it in GitHub Desktop.

Revisions

  1. richardevcom revised this gist Oct 13, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions wp-fix-permissions.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    chown -R www-data:www-data .
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;
    #find . -type f -name ".htaccess" chmod 640 {} \; # If you're not using Pretty URLs (permalinks), use 604 < 640 permissions.
    find . -type f -name "wp-config.php" chmod 440 {} \;
  2. richardevcom revised this gist Oct 13, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion wp-fix-permissions.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    chown -R www-data:www-data .
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;
    chmod 440 .htaccess wp-config.php
    find . -type f -name "wp-config.php" chmod 440 {} \;
  3. richardevcom revised this gist Sep 1, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion wp-fix-permissions.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    chown www-data:www-data -R .
    chown -R www-data:www-data .
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;
    chmod 440 .htaccess wp-config.php
  4. richardevcom created this gist Sep 1, 2024.
    4 changes: 4 additions & 0 deletions wp-fix-permissions.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    chown www-data:www-data -R .
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;
    chmod 440 .htaccess wp-config.php