WordPress Tutorial

How To Update WordPress: The Ultimate Guide

If you’re looking for tips on how to update WordPress, you’re in the right place. The process needn’t be challenging whether you’re updating the WordPress core, themes or plugins.

And in this post, we show you how to update your WordPress site without breaking anything.

You may wonder why even bother to update when you have every WordPress feature you need? We will answer that question and many more as well.

Why Update WordPress?

Should I update WordPress? Definitely, and there is no question about it.

Are you wondering why you should update your WordPress site when you already have the functionality you need?

Well, updating WordPress comes with unique advantages such as:

  • Better WordPress security since updates fix bugs and security vulnerabilities
  • More features and functionality that you don’t want to miss
  • Speed and performance improvements that come with each new version of WordPress
  • Compatibility with modern themes, plugins and web technologies

Before Updating

Before you hit the update button or make any changes to your WordPress site, it’s important to prepare beforehand for any eventualities.

Errors happen at the unlikeliest of times, and if you don’t have a fallback plan, you could be stuck with a broken site and a migraine to boot.

For starters, get in the habit of creating full WordPress backups.

Secondly, WordPress recommends that you deactivate all plugins before updating WordPress manually.

Usually, plugin-update conflict isn’t much of a problem, but it when it happens, it could render your site unusable.

The problem occurs when the new changes in WordPress conflict with the plugins you already have.

After upgrading, remember to activate your plugins.

With the backup in place and plugins out of commission, let us knuckle down and update WordPress.

We shall begin with the WordPress core and later on handle themes and plugins.

How to Update The WordPress Core

In this section, we look into how to update WordPress:

  • Via the WordPress admin dashboard
  • Manually using FTP
  • Using SSH and WP-CLI
  • Automatically via the cPanel, wp-config.php and functions.php

Updating WordPress via the Admin Dashboard

The easiest of all WordPress update processes, updating WordPress via the admin dashboard is a matter of point and click.

If there are any WordPress core updates available, WordPress shows you a notification at the top of your admin dashboard.

wordpress update notification in admin dashboard

Here, just hit the Please update now link to initiate the update process.

WordPress takes over and puts your website in maintenance mode until the update is complete.

The process involves deactivating and reactivating your plugins and downloading and installing WordPress among other things.

After a successful minor update, WordPress redirects you to the Updates screen, where you can update your themes and plugins.

wordpress updates screen

If it was a major WordPress release, say you’re updating from version 4.8 to 4.9.5, a successful update redirects you to the WordPress welcome screen as shown below.

how to update wordpress

From the image above, can you see just how many security issues and bugs every release fixes.

At this juncture, your WordPress platform is up to date. Now proceed and update your themes and plugins.

Moving on swiftly, let us learn how to update WordPress manually via FTP.

Using an FTP program such as FileZilla comes in handy when you can’t update WordPress via the admin dashboard for one reason or another.

How to Update WordPress Manually Via FTP

WordPress manual update isn’t as challenging as many make it out to be. Yes, there are more steps involved, but it is as easy as pie.

Note: For this section, you can use an FTP program such as FileZilla or the File Manager. Besides, all you need is access to your WordPress root directory.

For this tutorial, we use FileZilla.

To use an FTP program, you need the following details from your host: FTP username, password, host/hostname and port. If you are Hostinger client, you can find them in Control Panel -> FTP accounts section.

Hostinger FTP accounts section

With these details in hand, let us update WordPress manually.

Carry out the preliminary preparations, i.e., back up your site and deactivate all plugins.

Step 1 – Download The Latest Version of WordPress

download wordpress from wordpress.org

Firstly, head over to WordPress.org and download the latest version of WordPress by hitting the blue Download button.

Next, extract the WordPress archive on your computer using WinRar or WinZip.

Inside the wordpress folder, you should see sub-folders such as wp-admin, wp-includes, and wp-content as well as individual files such as index.php, wp-login.php, wp-config-sample.php and so on.

Step 2 – Access Your WordPress Root Directory

Using your FTP details, access your WordPress root directory.

accessing the wordpress root directory via ftp

Once you’re in, it is time to move files from the latest version of WordPress you have on your computer to the WordPress root directory on your host.

In other words, we will replace some files and folders on your web host with the corresponding files and folders from the WordPress package you extracted a minute ago.

Important: Don’t be in a rush to replace everything inside the WordPress root directory. You can easily break your site if you do this. Instead, follow the instructions below to the letter.

Delete the existing wp-admin and wp-includes folders on your web host. If you’re using FileZilla, just select the folders, right-click and choose Delete:

deleting wordpress folders via ftp

Don’t touch the wp-content folder yet since your themes, plugins, and media live inside the folder.

Step 3 – Upload New Versions

Once you’ve deleted the wp-includes and wp-admin folders, it is time to upload the fresh versions from your computer.

Access the WordPress folder on your computer via the left panel as shown below. Next, select the wp-includes and wp-admin folder, right-click and choose Upload:

uploading wordpress files via ftp

With the new versions of wp-includes and wp-admin on your server, it’s time to upload the other individual files inside the WordPress folder.

This time we won’t delete any file on the server, we shall merely overwrite them.

Select all the single files in your left panel as shown below, right-click and choose Upload. 

uploading wordpress files via filezilla

If you get a confirmation dialog box, choose Overwrite, and click the OK button.

Examine the wp-config-sample.php to see if there are any lines of code you need to copy to the existing wp-config.php file on your web server.

Finally, just navigate to your admin area (yoursite.com/wp-admin/upgrade.php/) to check if everything is working, and upgrade your database.

How To Update WordPress via WP-CLI

For this section, we assume you already have SSH access to your WordPress root directory, which is public_html in our case. If you are not sure how to access your account via SSH, see this tutorial.

Updating WordPress via WP-CLI is a two-prong affair, seeing as you need to update the database and the WordPress files.

If you’ve installed your WordPress site in a separate folder example public_html/your-site, then your WordPress root directory is your-site

Firstly, use the cd command to switch to your WordPress root directory:

cd public_html

Secondly, check if there’s a new version of WordPress:

wp core check-update

Example output:

| version | update_type | package_url                                                 |
| #.#.#   | minor       | https://downloads.wordpress.org/release/wordpress-#.#.#.zip |
| #.#.#   | major       | https://downloads.wordpress.org/release/wordpress-#.#.#.zip |

If there are no updates available, you will see “Success: WordPress is at the latest version” instead.

Thirdly, run the following command to update WordPress:

wp core update

Example output:

Updating to version #.#.# (en_US)...
Downloading update from https://downloads.wordpress.org/release/wordpress-#.#.#-no-content.zip...
Unpacking the update...
Cleaning up files...
No files found that need cleaned up.
Success: WordPress updated successfully.

Now you know how to update WordPress core via WP-CLI, let us update your database, theme, and plugins. To update your:

  • database, run the command:
    wp core update-db
  • themes, run:
    wp theme update --all
  • plugins, use:
    wp plugin update --all

How To Update WordPress Automatically

You know that WordPress minor releases update automatically. But did you know you can set up major releases to update automatically as well?

If you don’t like code, you can set up auto updates using a plugin such as Easy Updates Manager.

Hate plugins? You can enable automatic WP core updates by adding the following line to your wp-config.php file:

define('WP_AUTO_UPDATE_CORE', true);

How to Update WordPress Themes and Plugins

You will do yourself a great disservice if you leave your themes and plugins unattended while updating your WordPress core.

Well, navigate to your WordPress admin dashboard, and click the Updates menu item.

Clicking this menu item leads you to the updates screen where you can update the WordPress core, themes, and plugins.

wordpress updates screen

Updating your themes and plugins from this screen is self-explanatory. Just tick Select All and click either Update Plugins or  Update Themes to update all plugins and themes respectively.

Alternatively, you can update your plugins individually by navigating to Plugins -> Installed Plugins as shown below.

wordpress plugin update

Similarly, you can update WordPress themes by navigating to Appearance -> Themes as we illustrate below.

how to update wordpress themes

Note: Updating your WordPress theme will get rid of all customisations you’ve made to the theme. To avoid losing your customisation, consider using a child theme instead of editing your parent theme directly.

Final Word

Learning how to update WordPress helps you to upgrade seamlessly without breaking your site. It is our hope this post helped you in this endeavor.

Before you sign off, here’s a recap. Always create full backups of your WordPress site, whether or not you’re updating your website.

Additionally, always start with a child theme, so you can customize away and still update your theme without losing your custom work.

To boot, always source WordPress themes and plugins from reputable developers who update their products.

About the author

Domantas G.

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Add Comment

Click here to post a comment

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

Get Exclusive Content

Join thousands of webmasters who get our free newsletter with tips on how to drive more traffic and revenue to their websites!

Please wait...

Thank you for sign up!

More in WordPress Tutorial
How to Install WordPress Plugins