WordPress is the world's most popular website builder, with more than 43% of the web being built on WordPress. While this makes it an obvious choice for building a new website, it also means that WordPress sites are a prime target when it comes to hacks
The majority of WordPress websites that get hacked are due to an outdated WordPress core, plugins, or theme. WordPress updates fix bugs and security vulnerabilities, and often add new features. With that in mind, it is highly recommended to always keep your WordPress site up to date.
Here we detail the steps to update the WordPress core to the newest version either within the WordPress dashboard or via command line using WP-CLI.
Related Articles
Update WordPress Plugin
Update WordPress Theme
Log into WordPress Dashboard
Full and Partial Backups in cPanel
Enable/Disable Automatic Updates in WordPress
Find the Document Root of a Domain
Update WordPress from Dashboard
CAUTION: Updating WordPress can cause unexpected behavior or loss of functionality on your site. It is highly recommended to create a backup before proceeding with any updates.
- Log into the WordPress dashboard
- Navigate to Dashboard -> Updates
- Under "An updated version of WordPress is available", click the Update Now button
NOTE: If your site is running the latest version of WordPress, you will instead see a message stating, "You have the latest version of WordPress." with an option to re-install the current version.
Update WordPress using WP-CLI
- Access the server via SSH or using the Terminal in cPanel
- Navigate to the site's document root using the cd command
cd public_html
REPLACE: public_html with your domain's document root if different. See the guide on finding the document root of a domain for guidance. - Run the following command to check the current WordPress version
wp core version
- Run the following command to update to the latest version
wp core update --version=6.1
TIP: To update to a specific version instead of the latest, use the --version flag. For example:
wp core update --version=5.5.3
- Repeat step 3 to confirm WordPress has been successfully updated
Comments
0 comments
Article is closed for comments.