We have seen that to be able to upload plugins to your wordpress, you need to install a ftp programme like vsftpd.
Downloading install package from http://downloads.wordpress.org/plugin/twitter-mentions-as-comments.1.5.2.zip…
Unpacking the package…
Could not create directory. /var/www/wp-content/upgrade/twitter-mentions-as-comments.tmp
Return to Plugin Installer
I solved the problem this way:
(1) Give ownership of the entire wordpress folder to the ftp user.
If you created a ftp user named “lion”, then enter the following command in SSH:
chown -R lion /var/www/
(2) Give the user the right to create and delete directories, upload files etc
Open the vsftpd configuration file located at /etc/vsftpd.conf and add the following:
Now restart the vsftpd with the command
sudo /etc/init.d/vsftpd restart
service vsftpd restart
If this returns with an error like
restart: Unknown instance:
it means you have made a mistake in the configuration file. Don’t leave any space when you enter into the data referred above.
(3) As the ftp user is also the owner of the folder, file permissions of 755 should be enough:
chmod -R 755 * /var/www/
If it doesn’t work, change permissions of the wp-content folder to 777 at least till the installation of the plugin.