I am trying to update my wordpress site plugins and themes but I am not able to update them. I am getting below message.

An error occurred while updating All In One WP Security: The update
cannot be installed because we will be unable to copy some files. This
is usually due to inconsistent file permissions. languages,
wp-security.php….. so on

What I have tried is

  1. set permission of file and folders by the following commands

    find /var/www/html/ -type d -exec chmod 755 {} ;
    
    find /var/www/html/ -type f -exec chmod 644 {} ;
    
    chmod -R 777 /var/www/html//wp-content/cache/autoptimize
    
  2. run code for setting permissions

  3. added below code in wp-config file because wp asking for FTP details when installing or updating anything.

    define('FS_METHOD', 'direct');
    

My site is on AWS EC2 Ubuntu 16.04 with php7 server.

Read more here: wp + not able to install updates


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: