wordpress: Add installing/upgrading themes and plugins from wordpress
WordPress in itself is quite powerful and sufficient to create and manage a simple website or blog. It's true power, however, lies in the thousands of plugins and themes. Plugins extend the functionality of WordPress. For example, a contact form can be added to WordPress by installing the appropriate plugin. Themes change the appearance and layout of the site. Installing a new theme will provide an extra administration option for how your site will appear to your visitors.
WordPress tries to upload files to the webserver using FTP/SFTP. For us SFTP the best and safest bet. PHP module needed for this already installed in FreedomBox along with WordPress. So the option shows up in WordPress interface. However, there are challenges with this and this issue is to solve them:
- Non-admin accounts are not allowed to use SSH in FreedomBox (this can be explained to the user).
- Users in admin group can use SSH but the directory /var/lib/wordpress/wp-content is owned by www-data user and users of this group can't modify files there (unless they sudo which is not available via SFTP).
- www-data user can't be used because SFTP/SSH for it is forbidden and does not have a login shell (/usr/sbin/nologin set in /etc/passwd).
- root user may be used?