Upgrading WordPress Manually in Centos 7

Date Posted : 20-09-2018

In this article, we are about to learn about how to upgrade WordPress version from rear end.We assuming that your have installed LAMP stack.

Prerequisite :

Acquaintance of WordPress,MySQL

Assumptions:
  • Centos 7 is running in your server
  • WordPress version : 4.8.7  which will be upgraded to version 4.8.9
  • In this article, My WordPress root directory path will be /var/www/html/wordpress (You may change the path at your convenience)

In following paragraphs we are going to learn about upgradation step by step

Firstly, before upgrading WordPress version.You need to create a full backup of your website(includes wp files and database).This will helpful to restore the data when something goes wrong.

Upgrading WordPress Core

After performing Backup, lets move to upgradation.

Step 1 : Download the latest version of wordpress (as reference to this article,we are installing version 4.8.9) from officila wordpress website (https://wordpress.org/download/releases/)

Step 2 : Unzip the downloaded latest release into a directory on your local machine or in a separate directory at your convinent (In this example we saved in  directory/root/wordpress).

Step 3 : Go to your website root directory (i.e.) /var/www/html/wordpress.Delete the following directories ‘wp-admin’ and  ‘wp-includes’.

#cd /var/www/html/wordpress/

#rm –rf wp-admin wp-includes/

Step 4 : Now,Copy the ‘wp-includes’ and ‘wp-includes’ directories from the unzipped new version WordPress to the website root directory(which replaces the directories deleted in step 2 at website root directory)

#mv /root/wordpress/wp-admin /var/www/html/wp-admin/

#mv /root/wordpress/wp-inicludes /var/www/html/wp-includes

Step 5 : After step 4, dont delete any files or directories in the website root directory.Here, we going to copy all the files from unzipped new version WordPress directory to existing ‘wordpress’ website root directory (by this act we overwrite the existing files with same name)

#mv /root/wordpress/* /var/www/html/wordpress/

optionally, we can also backup the ‘wp-content’ of new version as backup before copying to current website root directory.

Step 6 : Your wp-config.php file will not be affected because wordpress default config file will be wp-config-sample.php.Investigate wp-config-sample.php for any updates to change in wp-config.php file.

Step 7 : Now,From Browser visit main WordPress admin page as ‘ip address (or)domain name/wp-admin/’.this will direct to sign-in page.If you’re encountered with error in sign-in,try once again after clearing browser cookies.

Step 8 : Clear your browser cache to experience the changes on your site.

After following above steps successfully,now your WordPress is upgraded completely with latest version of WordPress.

Please feel free to provide constructive feedback. Comments are greatly appreciated !

 

 

Leave a Reply