I’ve set up a Wordpress installation. I’d like to be able to SFTP into the wp-content
directory in Wordpress to create a custom theme by saving files directly to the server in the theme directory.
I followed this SFTP using ProFTPd tutorial and modified a few other things in /etc/proftpd/modules.conf
:
DefaultRoot
to /var/www/
/var/www/
, I also created a directory configuration directive: <Directory /var/www/>
<Limit STOR CWD MKD RMD DELE XRMD XMKD>
AllowAll
</Limit>
</Directory>
I still had issues creating files or this point and assumed it was a result of some unix permissions issues. I went to the var/www/
directory and entered the following two commands:
sudo chown -R username:username *
sudo chmod -R 0755 *
At this point, the .htaccess
file is still owned by www-data
but everything else is owned by my unix username (not root
). At this point, I could finally SFTP into my server and post files. Terrific!
…Except… When I use Wordpress at this point, I have trouble installing themes or plugins due, I assume, to (yet again) a unix a permissions issue. The error message I get is Unpacking the package… Could not create directory..
I’m no unix expert but it seems like in order to SFTP files into /var/www/
I need to own the files, but that prevents Wordpress from installing items through its web interface.
Can anyone help me configure things in such a way that things will work whether I manually SFTP or try to install a theme or plugin from Wordpress?
Thank you so much for reading. I hope this explanation was helpful.
This textbox defaults to using Markdown to format your 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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Thanks @sierracircle – seems like you’re saying I’d have to manually switch back and forth each time I wanted to switch between SFTP and installing updates via wordpress. That’ll be fine once the project launches, I suppose, but a poor solution while I’m building the site.
I was unaware that open-ssh server would allow me to do this, since searching for
ftp
in the community did not suggest that I could do this via open-ssh server.