Connect with us

Hi, what are you looking for?

Blogging

Upgrade Your WordPress Site via the Command Line

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.

wordpress-logo-hoz-rgb.jpg

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.

Written By

Joy Mali is a certified digital analyst who helps online businesses to perform better on the web with best solutions & advice. Her content is featured on many mainstream sites & blogs.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like

Web

WordPress is, more often than not, the standard platform for creating good websites and managing them. It is suitable for all web designers across...

Design

Are you looking for the best blog theme for your blog? However, there are many free and premium WordPress blog themes available in the...

Web

We started with one assumption while preparing this list of SEO strategies: you’re busy. So, these are approaches that you can use right now...

Web

Making sure you are receiving the appropriate WordPress theme for your requirements is crucial when buying one. A WordPress theme is a great place...