Skip to content

Instantly share code, notes, and snippets.

@ringmaster
Last active December 12, 2015 04:29
Show Gist options
  • Save ringmaster/4714997 to your computer and use it in GitHub Desktop.
Save ringmaster/4714997 to your computer and use it in GitHub Desktop.
1. Create a file at the webroot called whoami.php
2. Put this code in the whoami.php file and save it:
<?php echo `whoami`; ?>
3. Access whoami.php via the browswer to see who the user is that your web server runs as.
4. In the console, type this where {user} is the user from the whoami.php:
groups {user}
5. Observe the groups that the user belongs to. Usually it's just one. Usually it's "www-data"
6. cd to your WordPress directory
7. Run this command, change {user} to the user shown on the whoami.php page and {group} to the group from step 5 that looks like your server's group:
chown -R {user}:{group} wp-content
8. Run this command:
chmod -R ug+rw wp-content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment