Cannot edit theme php files says to ask host

I use WordPress (using ColorMag theme) for my site ( I’d like to give open permissions for editing the php files of theme. Yet, when I went to allow permissions on the theme’s files (such as Functions.php), it said I needed to contact the web-host. How do I allow open permissions for my theme’s php files?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@tonyhovsepian To change file permissions, you can use an SFTP / FTP program, such as FileZilla (link below), or you would need to log-in as root (or your sudo user) and issue a command, like the one provided by Ryan, on the directory or directories containing the files you wish to modify.

That being said, DigitalOcean is an un-managed VPS (Droplet) provider, meaning support is normally limited specifically to the server, server hardware and the network. Normally 3rd party scripts (including WordPress) are not covered under such, so getting help here within the community is the best route to take :-).

With a VPS, you’re in a slightly different environment than you are with a shared hosting provider as you’re given full root access to the server (meaning you can change anything, down to core functionality, with exception of the Kernel, for now).

What I am trying to do is following the instructions here with the WordPress Codex to grant permissions in order to edit the php files. When I go to right-click on the php file it says to contact webhost. Since, I don’t see live chat anywhere, I thought I’d ask the community first before opening up a ticket.

Is there a way to grant permissions without needing to open-up a ticket with Digital Ocean? Am I reading the WordPress Codex instructions correctly?

Assuming that your WordPress installation is in /var/www/html you can use the following command to ensure that all files in this directory are owned by the same user your web server runs as.

chown -Rf www-data.www-data /var/www/html/