How to update WordPress?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×
A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
sudo chown -R www-data:www-data /var/www
You can also update the WordPress core using WP-CLI from your command line. WP-CLI is useful for managing your website and one of the options you can use is to update the WordPress version for your site.
We have an existing tutorial on how to use WP-CLI to manage your WordPress site which you can check here:
Run the following command to check if there is an available update for WordPress.
wp core check-update
If there is an available update you will get the information about the update like version, updatetype and packageurl or else, the output will indicate that no update is available.
Run the following command to update WordPress:
wp core update
You will get the following output if the update completed successfully:
Success: WordPress updated successfully.
Hope that this helps!