Domanda

I have installed WordPress on a local LAMP installation. All I want is to edit the theme files locally on an editor like VS Code where I can open the theme folder and start editing on the go.

But I can't access them, as the access is denied to the whole wordpress directory. I can edit the files in the theme editor. But I want to do this in an external code editor. How can I achieve this. What permissions do I have to change.

I used these permissions during installation.

sudo chown -R www-data:www-data /var/www/wordpress

sudo find /var/www/wordpress/ -type d -exec chmod 750 {} \;
sudo find /var/www/wordpress/ -type f -exec chmod 640 {} \;

Elementary OS 5.1 based on Ubuntu 18.04

È stato utile?

Soluzione

You have to add yourself to group www-data. sudo usermod -a -G www-data yourUserName Don't forget the -a, which appends the new group to your existing groups. Otherwise you loose all other groups.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a wordpress.stackexchange
scroll top