Skip to content

Instantly share code, notes, and snippets.

@pixelstorm
Forked from h4n2k/gist:c6f6bc88f8e21388c9f8
Last active July 31, 2019 02:21
Show Gist options
  • Save pixelstorm/ae994129641f3d4067682bf27d89c99d to your computer and use it in GitHub Desktop.
Save pixelstorm/ae994129641f3d4067682bf27d89c99d to your computer and use it in GitHub Desktop.
file permissions wordpress
##list all files and folders in current direcory with file permissions and ownerships
ls -l
## change permissions of a single file or folder
Type chmod 755 foldername, and then press Return
It will recursively change all directory permission to 755,
and all file permissions to 644:
sudo find /var/www/domain_name1.com/ -type d -exec chmod 775 {} \;
sudo find /var/www/domain_name1.com/ -type f -exec chmod 664 {} \;
##see what groups a user belongs to
id -Gn user
##ownership
sudo chown -R $USER:www-data /var/www/domain_name1.com/
wp config
/** Allow Direct Updating Without FTP */
define('FS_METHOD', 'direct');
/** Disable Editing of Themes and Plugins Using the Built In Editor */
define('DISALLOW_FILE_EDIT', 'true');
/** Allow Automatic Core Updates */
define('WP_AUTO_UPDATE_CORE', 'true');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment