Blog / How to Update WordPress: Different methods to keep your website up to date

How to Update WordPress: Different methods to keep your website up to date

by SW Team

How to Update WordPress: Different methods to keep your website up to date

Keeping your WordPress installation up to date is crucial for security, performance and access to new features. There are several ways to update WordPress. In this post we will explain the 4 main and most popular ways that exist.

cta:hosting_wordpress

1. Upgrading using the Command Line Interface (CLI)

Prerequisites:

To perform the upgrade, you can use the command line using the WP-CLI tool.

To do this, you will need these prerequisites:

  • SSH access to your server.
  • WP-CLI installed.

Steps to follow:

  1. Connect to your server: You can access your server using an SSH connection manager such as PuTTY or using the command line:

ssh [email protected]

or

ssh usuario@ipdetuservidor

  1. Navigate to the directory of your WordPress installation: Once you have SSH'd into your server, navigate to the root directory of your website. Depending on your hosting provider, this directory may vary.

cd /ruta/a/tu/wordpress

  1. Check the current version of WordPress: The first step, we must check what version we have installed, and if there is an update.

Verify the current version of your WordPress installation:

wp core version

Check for updates:

wp core check-update

  1. Update WordPress: If updates are available, the next step is to update the WordPress version.

To do this, use the following command:

wp core update

Then, it also updates the database using:

wp core update-db

  1. Update your plugins and themes: Finally, and once you have the latest version of WordPress up and running, don't forget to update all your plugins and themes.

wp plugin update --all wp theme update --all

cta:cloud_app_wordpress

2. Update via FTP

Prerequisites

To perform the update, you can use your FTP account and your trusted FTP client to upload the WordPress update file.

To do this, you will need these prerequisites:

  • FTP credentials for your website.
  • FTP client (e.g. FileZilla) or, failing that, access to the file manager of your hosting service.
  • WordPress update files

Steps

  1. Download the latest version of WordPress from the website. Go to https://es.wordpress.org/download/ and click on Descarga WordPress.

  2. Connect to your server using the FTP client. Use your trusted FTP client to access your server or hosting service and navigate to the directory containing your website. Depending on your hosting provider, the directory may vary.

  3. Process and upload the WordPress files: Once you have uploaded the downloaded file from the WordPress website you will need to perform a few additional steps.

    • Unzip the downloaded file. _ You will find a folder called wordpress. Access it and delete the wp-config-sample.php file and the wp-content directory to avoid data loss._

    • Remove and upload the update directories on your website. Delete the wp-includes and wp-admin directories from your website. Then go back to the wordpress folder you unzipped and upload the wp-includes and wp-admin directories to your website.

    • Upload the rest of the contents of the wordpress folder to your installation directory.

    • Overwrite the existing files when prompted.

  4. Upgrade the database: Go to tusitio.com/wp-admin/upgrade.php and follow the instructions you will see on the screen. Once finished, you will have your WordPress upgraded.

3. Automatic Upgrade

WordPress allows settings for updates to be performed automatically.

Prerequisites

  • Access to your wp-config.php file.

Steps

  1. Enable automatic updates To enable automatic updates it is as easy as going into your WordPress settings and activating the button that enables automatic updates.

To do this go to Security -> Settings -> Automatic Updates and enable the Enable Automatic Updates button.

  • There is an alternative way that we show you below:

Edit wp-config.php** using the file manager of your hosting service or from your FTP client and add the following line to enable automatic updates:

define('WP_AUTO_UPDATE_CORE', true);

It may sometimes happen that the line is already present but deactivated:

define('WP_AUTO_UPDATE_CORE', false);

Change false to true. Remember to save your changes.

  1. Additional configuration for plugins and themes (optional):

    • Use the Easy Updates Manager plugin to manage which components are updated automatically.

4. Updating from the WordPress Dashboard

This is the easiest and most recommended method for most users.

Prerequisites

  • Access to the WordPress dashboard with administrator privileges.

Steps

  1. Log in to the dashboard:

    • Navigate to tusitio.com/wp-admin. If you use a plugin to change the login link, such as WPS Hide Login, this link may change
  2. Go to 'Desktop' > 'Updates'.

  3. Check for available updates:

    • If there is a new version of WordPress, you will see a button that says ‘Update Now’. Click it. WordPress will automatically download and replace the necessary files.
  4. Update plugins and themes:

    • On the same ‘Updates’ page, select the plugins and themes that need to be updated and click “Update plugins” or “Update themes”.

cta:domains

Final Tips

  • Make a backup: Before any upgrade, make sure you have a complete backup of your site (files and database).
  • Check compatibility: Verify that your plugins and themes are compatible with the new version of WordPress.
  • Monitor the site: After the upgrade, check your site to make sure everything is working properly.

Keeping your WordPress site up to date is an essential task to ensure its security and functionality. With these detailed instructions, you can choose the method that best suits your needs and ensure that your site is always in top condition.

i