This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable site config | |
a2ensite config_name.conf | |
# Disable site config | |
a2dissite config_name.conf | |
# Reload Apache2 config | |
systemctl reload apache2 | |
# List all files and folders with permissions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo 'Provide folder name as first parameter' | |
exit 1 | |
fi | |
if [ -d $1 ]; then | |
echo 'Folder alrady exists!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# 1- Add this file in public_html | |
# 2- give execute permissions by: chmod +x fix-wordpress-permissions.sh | |
# 3- use this command to execute | |
# sudo sh ./fix_wordpress_file_permissions.sh /home/yourwebsite-goes-here/public_html | |
# |