How to Give WordPress Permissions on MacOS
Recently I was setting up WordPress on my new MacBook, and I was having trouble with WordPress permissions on macOS. Usually, I will install the Bitnami WordPress module for XAMPP. For whatever reason, Bitnami no longer offers the module as of this writing. Instead, I had to install WordPress manually.
After installation, accessing the localhost WordPress site worked fine. That was until I went to install a new theme. The install gave me an error saying it didn’t have permission to access the WordPress theme directory. The same error occurred when attempting to install plugins as well.
At this point, I searched online to see if anyone else had the same issues that I was having. And almost every answer led me to the same fix: give everyone permission to XAMPP folders and subfolders. However, many experts, including myself, will tell you that setting permissions to files and folders to 777 will create a security risk.
Eventually, I discovered the best answer on my own; one that I didn’t find anywhere online. In addition, I hope this answer helps other macOS users who have experienced or are experiencing this problem.
Changing WordPress Permissions on macOS
Subsequently, six folders need to have their permissions changed in just the WordPress directory:
- The primary htdocs/wordpress directory
- The htdocs/wordpress/wp-content directory
- The wp-content/uploads directory
- The wp-content/themes directory
- The wp-content/plugins directory
- The wp-content/upgrade directory
To do this, right-click on each folder and click ‘Get Info’.
After that, at the bottom of the window, look for ‘Sharing & Permissions’. Also, you may have to click the lock on the bottom right to enable editing the permissions. Clicking on the lock icon will ask you for your password. While holding the ‘Option’ key down, click the + sign in the bottom left. A list of users will appear that you can add.
The user you are looking for is called ‘System Services’. However, when you type in the search bar for System, it doesn’t appear in the list. The user you’re searching for is called a “daemon” [System Service]. Select ‘System Services’ from the list and give the daemon the ‘Read & Write’ privileges. XAMPP/WordPress will now be allowed to work sufficiently on macOS.
If this solution helped you with WordPress permissions, please comment or share this post with someone you know who may be having the same issues.