Without a doubt WordPress is one of the best, most popular user friendly open-source CMS (Content Management System) platforms today. One of the very few bad sides of WordPress is that this CMS platform is frequently exploited by hackers who want to take over the control of your blog/website.One of the most popular methods used by hackers is to look up for known vulnerabilities in old WordPress versions. They can easily compromise your web site or ever worse, they can compromise your entire WordPress VPS if they find a security hole in your WordPress installation. That is why it is extremely important to keep your WordPress up to date and always run the latest version of it. WP-CLI is a set of command-line tools for managing WordPress installations. It gives a facility of updating plugins,set up multiple installs and much more,without using a web browser.The WordPress update can be done very easy in less than 5 minutes.
You can update your WordPress installation on your Virtual Private Server (VPS) following the instructions below.
First of all, do not forget to make backup of the existing WordPress directory and MySQL database
|# mysqldump -u WPUSER -p WPDATABASE > /tmp/backup.db.sql|
|# tar -zcvf /tmp/wpbackup.tar.gz /var/www/html/website|
After the backup is completed, go to the directory where WordPress is installed and download the latest version from their site and unzip the downloaded file:
|# cd /var/www/html/website|
|# wget http://wordpress.org/latest.zip|
|# unzip latest.zip|
Delete the old ‘wp-admin’ and ‘wp-includes’ directories:
|# rm -rfwp-admin wp-includes|
Copy the content from the extracted directory to your current directory:
|# cp -arwordpress/* .|
Remove the downloaded zip file and ‘wordpress’ directory:
|# rm – rf latest.zip wordpress/.|
After all you should login to http://yoursite.tld/wp-admin/upgrade.php and finish the update.
By effectively using wp-cli, you will no longer have to continually switch between the web browser and the terminal window when doing changes that might not be available from within the web interface.
It is not only important to have a successfully running WordPress site over the internet, but it is equally important to know the steps for securing your WordPress site against unauthorized access of hackers. You should keep a check on your site’s performance and security by updating your WordPress Installation regularly to ensure its better performance.