How to Upgrade or Reinstall WordPress in your Server

From time to time you will need to upgrade your WordPress installation for better security and making use of new features. I highly recommend everyone to upgrade your WordPress with the latest version as it is one of the fundamental concepts in securing WordPress. Upgrading WordPress is necessary whenever a new stable version is released in the community website – WordPress.org

Reinstalling WordPress is necessary only if your current WordPress installation goes buggy and becomes useless. In most cases, a bug in WordPress installation can be fixed by troubleshooting the codes, themes, checking for any messy plugins and other methods. But if you are not an expert programmer, the next best option is to reinstall your WordPress completely which may solve the problem.

Upgrading and reinstalling WordPress involves the same steps. In fact they both are very similar in process to Installing WordPress in your Server. But there are certain important things you need to take care of before upgrading/installing WordPress.

Important steps to take care before upgrading WordPress

1. Back up your Theme (and other important themes if any) – You can do this by downloading your themes folder via FTP. Access your websites FTP and from the main directory reach wp-contents directory. You can find the the “themes” directory here. You can either backup the whole directory or get inside the directory and backup the specific theme files.

2. Backup All Important Plugins – You can do so by accessing the wp-contents/plugins directory. In most cases you don’t need to back up all the plugins. But if you are not sure which all are the important ones, I would recommend a complete plugins directory backup.

3. Backup your files – In WordPress all the files are stored in the “uploads” directory inside “wp-contents” directory. So you can access it via wp-contents/uploads. Here you will see all your files stored inside many directories and sub directories which are named using numerical years & months. For example:- All the files uploaded in February – 2013 will be stored inside the subdirectory named 02 which will be inside the directory named 2013

4. Download a copy of the configuration file – In the main directory of your wordpress installation, you will find a PHP file named wp-config.php. Download a copy of the file. This file holds your database configuration details like Database name, Database username, password, Hostname etc.

5. Backup your WordPress Database – You can take a backup of your WordPress database in many ways. The most common method is to export data via PhpMyAdmin. You can also take a backup using the WordPress Database Backup plugin

These are the 5 important steps you must do before upgrading your WordPress installation. Now lets begin the process.

Upgrading your WordPress Installation

Let’s begin the process. First access your domains root folder via FTP. I have used WebFTP of Dreamhost to explain the process using screenshots. You can find the screenshot of WebFTP login screen. (You can use any FTP software of your choice. However choose one with zip folder extraction feature. This will make things very easy for you and fast.)

Upgrading WordPress Installation

A screenshot of the root directory is shown below. Yours will also look some what similar. See the directory named “mbaknol.com” marked inside the box. This is the directory where your active WordPress installation resides.

Upgrading and reinstalling wordpress

Note:-  Now get inside this active directory and do the important steps mentioned above. You can do steps 1,2,3 and 4.

The process of upgrading WordPress may take anywhere between 5 minutes to even 1 hour or more. This highly depends upon the speed of your internet connection and your overall knowledge of the process. A highly experienced person can do this in less than 10 minutes. In any case, we don’t prefer a website to go down while upgrading takes place. To make this possible we are creating a new directory in our root folder. You can name it anything (its just a temporary directory. we will rename it later) and here I call it “mbaknol_tempo“. Refer the screenshot below.

Upgrading and reinstalling wordpress. Securing WordPress.

Okay! Now get inside the directory “mbaknol_tempo” and upload your latest version of WordPress as Zip file. You cam download the latest version of WordPress from the community website. At the time of this article, I were uploading version 3.5.2. I used WebFTP of Dreamhost to upload the zipped folder of WordPress to the newly created directory. Refer the screenshot below.

Upgrading and reinstalling wordpress. Securing WordPress.

Now that we have finished uploading the zipped folder, lets now unzip it. Right click on the “zipped” folder and see if there is “extract” option. All you need to do is , select the uploaded zip file and hit the “extract’ button in your FTP client. Now if you have chosen an FTP client without an “extract” option, don’t worry! We have more ways to one destination! In my case, WebFTP of Dreamhost had no unzipping/extract option. So I opened a new tab in my browser, accessed Net2FTP and then logged into the same FTP area of MbaKnol. I then reached our newly created directory “mbaknol_tempo”, selected the zip folder and then hit “unzip” button. Refer the screenshots below to get more clarity.

Upgrade your WordPress. Secure WordPress.

Since we are using a temporary directory, you don’t need to set any specific target directory. Those files will get extracted to a directory named WordPress inside our newly created directory. So hit the  green tick button. Refer screenshot below.

netftp_etract_2

Upon successful extraction, a page shown as below will be outputted.

net2ftp_success

Upon completing “extraction” our newly created directory “mbaknol_tempo” will look like shown below.

extract_look

Okay! Now lets move those extracted files out of the “wordpress” directory. We need all the files and directories inside the extracted “wordpress” directory to be moved to main directory “mbaknol_tempo“. To do this, get inside “wordpress” directory and select all files and directories. Now right click and hit “move” button. Refer the screenshot below.

move_1

Once you hit the move button, select your destination directory. In our example case it is “mbaknol_tempo”. Refer the screenshot below.

move_2

Now this is how our newly created directory “mbaknol_tempo” will look like. Refer screenshot below.

moved_out

You can delete the empty directory “wordpress” if you want.

We are nearing the final steps of upgrading wordpress. Now you need to do four things to complete  upgradation. 1) Copy the “themes” folder (wp-content/themes) from the currently active WordPress installation directory to the newly created directories wp-contents folder. 2) Copy the “plugins” directory from active installation to new intsallation’s wp-contents folder. 3) Copy the “Uploads” folder from active installation to newly created wp-contents folder. 4) Finally copy the configuration file wp-config.php from active installation to newly created directory. I have added the screenshots of 1 step below. All other steps are just the same, all you need to do is change the source directory and destination directory perfectly.

 themes_copy

Note:- The source must be the active wordpress installation

Select the destination folder and hit the submit button.

themes_move_2

Okay! Now repeat the same steps for plugins, uploads and wp-config.php. Once you finish those 3 steps, lets move to the last step of upgrading wordpress.

Last step is very simple. Change the name of the directory which contains active wordpress installation. If you want to follow a standard practice, you can name it with a .old extension. So I named it mbaknol.old. Now finally we should rename our newly created directory with the original name of the active wordpress directory. So here in our example, rename the newly created directory “mbaknol_tempo” to “mbaknol.com

That’s all about upgrading WordPress. You are done with it.  Now you can test if everything is working fine. Load your website and check a couple of articles randomly. If everything is fine, go get yourself a cup of coffee.

Note:- In some cases you will have to upgrade your database too. Don’t worry! its a single click adventure.You will be prompted to upgrade database while you login to the admin area of your wordpress. If you are sure of having a database backup, just hit the “upgrade database” button with your sweet closed eyes.

About the author

Jojo Joson

Add comment

Categories