Update wordpress permissions
# Recommendation from Wordpress
#
# Set all diretories without touching files
sudo find /var/www -type d -exec chmod 755 {} +
# Set all files without touching directories
sudo find /var/www -type f -exec chmod 644 {} +
# and then set the owner and group as www-data:
sudo chown -R www-data:www-data /var/www/your_wordpres_folder
# When you use SSH to upload files, or install
# plugins, those files are set as owned by the
# user you are logged in with SSH, so that could
# be what was causing the issue.