I feel that I have tried every solution online for the past few months with no solution.
When I go to install a plugin on Wordpress, it will not work and give me the error:
Unpacking the package…
Installing the plugin…
Could not create directory. /var/www/html/wp-content/plugins/PLUGIN_NAME/
Plugin install failed.
What annoys me is it used to work when I installed wordpress on the EC2, then all of the sudden it stopped working one day a few months ago.
What works is when I SFTP with Filezilla. So if I connect with FileZilla, I can create a directory and then manually extract the zip file on my computer and upload each individual file through fileZilla into the created directory.
When I SSH I use ec2-user
I played around with chown to ec2-user:ec2-user for /var/www/html and chmod to 777 and back to 755 and putting in the wp-config define('FS_METHOD', 'direct'); but still nothing.
Please help. Thank you.