-
Notifications
You must be signed in to change notification settings - Fork 66
How to manage WordPress plugins
- Installing a new plugin
- Deactivating a plugin
- Keeping a plugin up-to-date
- Removing an existing plugin
- Managing a plugin on a multisite network
- Updating your server
Plugins are a necessary component of any WordPress site. Almost every WordPress site uses plugins to customize its behavior. This guide will show you how to manage plugins on your WordPress server using DebOps.
You'll learn how to perform common plugin tasks. It'll teach you how to install, deactivate, update and remove a plugin. You'll also see how to perform these tasks on a multisite network.
This guide assumes that you're familiar with how to customize your server. If you don't know how or aren't sure, take a moment to go over this guide first.
DebOps lets you manage plugins using the wordpress__plugins
option. wordpress__plugins
is the list of plugins that DebOps controls on your server. To install a new plugin, you just need to add the plugin slug to it. Here's an example:
# inventory/host_vars/wordpress.example.com/vars.yml
wordpress__plugins:
- name: 'ricg-responsive-images'
This tells DebOps to install the "RICG Responsive Images" plugin. ricg-responsive-images
is the slug of the plugin. You can find a plugin's slug by looking at its URL in the WordPress plugin directory. For example, you'd find the "RICG Responsive Images" plugin at https://wordpress.org/plugins/ricg-responsive-images/
.
Deactivating a plugin is quite simple. You only need to add enabled: False
below any plugin that you want DebOps to disable. You can find our updated example below.
# inventory/host_vars/wordpress.example.com/vars.yml
wordpress__plugins:
- name: 'ricg-responsive-images'
enabled: False
It's worth noting that this only disables the plugin. It doesn't remove it from your server. You have to be careful using this option. Let's say that you re-enable the plugin yourself. If you rerun debops wordpress
, it'll disable the plugin again.
You can also have DebOps update plugins for you. You just need to add state: 'latest'
below any plugin that you want DebOps to update. Here's an example:
# inventory/host_vars/wordpress.example.com/vars.yml
wordpress__plugins:
- name: 'ricg-responsive-images'
state: 'latest'
By default, DebOps won't update a plugin. It'll just ensure that the server has it installed. That's because you might not want plugins to update whenever you run debops wordpress
. That's why you have to set the option for it to happen.
To remove a plugin, you just need to set the state: 'absent'
below any plugin you want DebOps to remove. You can see it in the example below. It shows you how to tell DebOps to remove a plugin from your server if it has it installed.
# inventory/host_vars/wordpress.example.com/vars.yml
wordpress__plugins:
- name: 'ricg-responsive-images'
state: 'absent'
Things are a bit different if you use a multisite network. If you have the wordpress__multisite
set to True
, plugins are network activated by default. You can change this behaviour by setting network: False
(as shown below). This tells DebOps to only activate the plugin on the main WordPress site and not the network.
# inventory/host_vars/wordpress.example.com/vars.yml
wordpress__multisite: True
wordpress__plugins:
- name: 'ricg-responsive-images'
network: False
You don't need to create a new server to manage WordPress plugins. DebOps can update an existing server with the plugin changes you defined in wordpress__plugins
. You just need to run the WordPress DebOps playbook.
$ debops wordpress
Getting Started
Adjusting performance
Cookbook
- How to configure a server for a Bedrock project
- How to configure multiple WordPress sites on a single server
- How to configure Varnish
- How to create a multisite network
- How to customize your server
- How to manage additional users
- How to manage WordPress plugins
- How to secure your WordPress site
Troubleshooting
Appendix