For some reason, if auto-updating does not work on your server or localhost, then try MANUALLY updating.
Download the latest WordPress zip file from WordPress.org and unzip it, and use that to copy up. Access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), and delete then replace your copies of everything on the server EXCEPT the wp-config.php file and the /wp-content/ directory with fresh copies from the download.
This will effectively replace all of your core files without damaging your content and settings.
(Remember: do not delete the wp-content directory or your wp-config.php file). Please read the Manual Update directions first.
NOTE – you should replace all the old WordPress files with the new ones in the
wp-admin directories and sub-directories, and in the root directory (such as
wp-login.php and so on). Don’t worry – your
wp-config.php will be safe.
Be careful when you come to copying the
wp-content directory. You should make sure that you only copy the files from inside this directory, rather than replacing your entire
wp-content directory. This is where your themes and plugins live, so you will want to keep them. If you have customized the default or classic themes without renaming them, make sure not to overwrite those files, otherwise, you will lose your changes. (Though you might want to compare them for new features or fixes..)
Lastly, you should take a look at the
wp-config-sample.php file, to see if any new settings have been introduced that you might want to add to your own
Watch this video tutorial: