Cannot edit theme php files says to ask host

July 10, 2015 807 views

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?

3 Answers

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/

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?

@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).

Have another answer? Share your knowledge.