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.
Edit: The above works if you want to install or update themes, plug-ins, etc. However, I just discovered that if you plan to update WordPress itself, you need to apply the same permission to the WordPress folder and all of the contents within.
To do this, after you set the system services up for the main WordPress folder, look for the ellipses under the names of sharing and permissions. Click the ellipses and there should be an option to apply to all content(in the folder we are modifying). You will need your administrator password if you haven’t already clicked to unlock.
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.