Skip to main content
TrustServers Knowledge Base

Tip: Start typing to get instant search results.

Table of Contents

How can I deactivate a WordPress plugin without access to the WordPress backend (/wp-admin)?

On all our servers, wp-cli is installed.

wp-cli is the official command line tool for managing WordPress, and provides many capabilities and conveniences.

It works via SSH, so to use it you need to have SSH access to the server enabled.

When your WordPress admin environment via web is not working (e.g., due to problems with WordPress upgrade), you can deactivate a plugin using wp-cli without accessing the admin panel.

Instructions

  • Log into the server via ssh.
  • Navigate to the folder containing the WordPress files with the command: cd public_html
  • At this stage we can run wp-cli. To see the list of plugins, we run the command: wp plugin list
    This shows us a list of the installed plugins in our WordPress.
  • Find the plugin you want to deactivate from this list and run the command: wp plugin deactivate <plugin-name>, where in <plugin-name> we enter the plugin name as it appears in the above list.

Example

$ ssh username@example.trustservers.gr

$ cd public_html

$ wp plugin list
+----------------------+----------+-----------+---------+
| name                 | status   | update    | version |
+----------------------+----------+-----------+---------+
| wordfence            | active   | available | 7.10.7  |
| wordpress-seo        | inactive | none      | 21.5    |
| contact-form-7       | active   | none      | 5.8.2   |
+----------------------+----------+-----------+---------+

$ wp plugin deactivate contact-form-7
Success: Plugin 'contact-form-7' deactivated.
Was this article helpful?
Please Share Your Feedback
Πώς μπορεί να βελτιωθεί το άρθρο;
Tags:
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.