Learn Wordpress Directory and File Permission

The issue of setting the correct permission hits me every time I install Wordpress. So I've created a script that will set its content to the correct permission. Below is part of the script:

// Make sure that the proper owner is set since I'm deploying to Amazon this time, my user is bitnami. But normally we use wordpress.
>sudo chgrp -R bitnami /WORDPRESS_DIR

// Find and sets all the directories permission to 775. This operation is recursive.
>sudo find /WORDPRESS_DIR -type d -exec chmod 775 {} \;

// Find and sets all the files permission to 664. This operation is recursive.
>sudo find /WORDPRESS_DIR -type f -exec chmod 664 {} \;

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source

Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.

Explore NERV on GitHub →