For Development
chown www-data:www-data -R * # Let Apache be owner find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-- sudo chown -R www-data:www-data www/html/folder/
In production, I wouldn’t give access to users to modify the filesystem, I’ll only allow them to upload resources and give access to some plugins specific folders to do backups, etc. But managing projects under Git and using deploy keys on the server, it isn’t good update plugins on staging nor production. I leave here the production file setup:
# Set uploads folder user and group to www-data chown www-data:www-data -R wp-content/uploads/
www-data:www-data = apache or nginx user and group
Staging will share the same production permissions as it should be a clone of it.
Finally, development environment will have access to update plugins, translations, everything…
# Set uploads folder user and group to www-data chown www-data:www-data -R wp-content/ # Set uploads folder user and group to www-data chown your-user:root-group -R wp-content/themes # Set uploads folder user and group to www-data chown your-user:root-group -R wp-content/plugins/your-plugin
www-data:www-data = apache or nginx user and group your-user:root-group = your current user and the root group
These permissions will give you access to develop under themes
and your-plugin
folder without asking permission. The rest of the content will be owned by the Apache or Nginx user to allow WP to manage the filesystem.
Before creating a git repo first run these commands:
# Set all directories permissions to 755 find . -type d -exec chmod 755 {} \; # Set all files permissions to 644 find . -type f -exec chmod 644 {} \;
MySQL manages connections to the database server through the use of a socket file, a special…
To remove the .html extension from your urls, you can use the following code in…
Use free/paid SSL certificates https://www.sslforfree.com Enable SSL Module Replace 'default-ssl' with the real site name…
Create archive of all files under public_html directory ignoring all files and folders including text…
To install some file *.tar.gz, you basically would do: Open a console, and go to…
The chown command has the following syntax: [crayon-67a5aeafbe357509481830/] So in your example command it is your primary…