Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if ! $(wp core is-installed);
then
echo "[ERROR] Wordpress is not installed."
exit 1
fi
# Get configuration file
if [[ ! -f w3-total-cache-v1.json ]];
@nunesbeto
nunesbeto / fix-wordpress-permissions.sh
Created September 4, 2019 16:19 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory