Wordpress: Unpacking the package… Could not create directory

Solution 1:

Had the same issue just recently and found a fix.

You need to change permissions on the folders inside wp-content folder:

    sudo find /var/www/wordpress/ -type d -exec chmod 755 {} \;
    sudo find /var/www/wordpress/ -type f -exec chmod 644 {} \;

After you've done that, add the following to your wp-config.php file and it should work just fine.

    define('FS_METHOD','direct'); 

Solution 2:

Just had this issue, took me a whole day to figure that out.

Check that user and group in /etc/php/php-fpm.d/www.conf are set to www-data. By default it's http.