WordPress permission settings

AutorNachricht
Veröffentlich am: 31.07.2024, 14:32 Uhr
I am a complete newb and trying to figure out how to set correct permissions for WordPress folders in order to be able to update/install plugins and themes.
I installed WordPress on my desktop and playing around creating a website on localhost. The local website is installed in the /opt/lampp/htdocs/site_name/ folder.
Right now I am showing owner as www-data with permissions set as 755. This does not seem to work as I cannot install/delete plugins. In WordPress admin Tools –> Site Health it shows that none of the folders are writable.

The main WordPress directory - Not writable
The wp-content directory - Not writable
The uploads directory - Not writable
The plugins directory - Not writable
The themes directory - Not writable

Who should the owner of all these folders be? Is it apache www-data or my login account?

Directories information as reported in WordPress:

wordpress_path: /opt/lampp/htdocs/site_name
uploads_path: /opt/lampp/htdocs/site_name/wp-content/uploads
themes_path: /opt/lampp/htdocs/site_name/wp-content/themes
plugins_path: /opt/lampp/htdocs/site_name/wp-content/plugins

I have found loads of links on the topic but still can't get it to work.
Veröffentlich am: 31.07.2024, 16:35 Uhr
To solve the permissions issue with your WordPress installation on localhost, you need to set the correct ownership and permissions for the directories.
Veröffentlich am: 31.07.2024, 16:35 Uhr
You need to make sure your folders are owned by the right user and group. Since you’re using XAMPP, the owner should be www-data for both. Change the ownership to www-data.
Next, set the permissions for the folders. They should be 755 for the main WordPress directory, wp-content, uploads, plugins, and themes.
If that doesn’t work, try changing the permissions to 775 to give write access to the group.
Check the Site Health tool in WordPress admin again to see if the folders are now writable. If you’re still having trouble, you might want to look into ***** for more help.

Login