It may fix various problems with your WordPress
First of all backup your files and database
Enter your www/ folder
cd /home/USER/public_html
Download/extract and replace files using latest WordPress version from an original source
wget https://wordpress.org/latest.zip unzip latest.zip rsync -avz wordpress/* ./
Fix ownership if needed
chown -R USER: *
Remove temporary files and folders
rm -rf ./wordpress/ ./latest.zip
Using WP-CLI:
wp core download --force
Click here to know how to install WP-CLI