Wordpress

How to: Update WordPress without FTP

Keeping your WordPress installation updated is a huge responsibility. Every once in a while, a new update either for plugins or themes is announced. Furthermore, keeping the core updated is one of the most important components of a WordPress installation. This guide is for those WordPress administrators who don’t have an update option in their dashboard, also for those who don’t have an ftp access for their WordPress installation. You can update your WordPress without FTP.

Obtain SSH keys or login credentials from your hosting provider

It’s time to get SSH login credentials from your hosting provider. Create a ticket in the support section and ask them for the required login. Almost every host will provide you with an SSH login. In case you own a cPanel hosting, you yourself can login through SSH using the cPanel. Further, the procedure for getting an SSH login through a dedicated server is ever more easier.

ssh [email protected]

Install WordPress CLI for managing WordPress through SSH

The next and second step is to install WordPress command line interface tool. It is an open source tool which allows you to manage your WordPress installation through a command line interface.

1. curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
2. php wp-cli.phar --info
3. chmod +x wp-cli.phar
4. sudo mv wp-cli.phar /usr/local/bin/wp

Make sure that your current WordPress version is at least 3.7, further your PHP version should be 5.4 or later. Additionally, it’s made for UNIX environment, it wouldn’t work 100% on a Windows run server.

Update WordPress, plugins and themes using WP CLI

The third and last step is to update your core WordPress installation. There are different commands for performing different tasks. For example if you want to update your theme, there would be a different command, let’s start with the command which would give your information about WP CLI.

$ wp --info

The output must be all the details of your server’s PHP version, shell path and other WP-CLI attributes. If you don’t see any output, as mentioned, then make sure that you’ve installed the WP-CLI in the correct manner.

Update WordPress core using WP-CLI:

Navigate to your WordPress directory, like in most cases the path is something like, /var/www/public_html/WordPress, the path may be different for different installations. You need to CD your path into the root of your WordPress installation, where your wp-content folder and other configuration files are present.

$ wp core update

Learn: Backup WordPress without FTP and cPanel using SSH

Update WordPress themes and plugins to latest:

Following is a list of the important commands which you can run to activate, update or deactivate plugins or themes in WordPress using SSH.

wp plugin activate helloActivates plugin named hello
wp plugin deactivate helloDeactivates plugin named hello
wp plugin update --allUpdates all plugins
wp theme install twentysixteenInstalls theme named twentysixteen
wp theme update --allUpdates all themes
wp theme disable twentysixteenDisables theme named twentysixteen
A few important commands for WP-CLI to update theme and plugin in WordPress through SSH

Conclusion:

You can update your WordPress, manage database, update plugins or themes using SSH. The other commands available for WP-CLI can be access on WordPress Documentation page. It’s a good open source solution if you want to manage multiple WordPress websites without using FTP. Further, it not only saves time but also allows for better security. You can disable dashboard updates in WordPress.

Leave a Comment