WP deployer and your plugins :


WP Deployer doesn't handle plugin downloads, only activation and upgrading.

For example, if you want to deploy a new plugin on one of your sites, you'll need to copy them to your sites first before launching an import.

Configuring a new plugin:

 

^

What to watch

A plugin can:

  • install data tables,
  • install values, for example in the options table.
  • modify values.

So it's worth looking at every table column added, every row added to the installation in a table (especially options).

One case to check and which will recur regularly concerns IDs (autoincremented database field). For example, an "entity" that references another "entity". IDs are not deployable, and require human intervention to ensure that links are preserved when "entities" are deployed.

^

Inspect table structure

In the screenshot above, this is PhpStorm's "Modify" view of the "wp_redirection_logs" table added by the "redirection" plugin. The "redirection_id" field is most likely an ID linked to another table in the module. This field must therefore be configured as a reference to another table.

^

Intervene on configuration from the UI

Here's an example of how to modify the configuration.

First of all, be aware that WP Deployer attempts to automatically configure the table as soon as the plugin is installed.

So all you have to do is modify the UI configuration.

 

Configure Schema

 

Go to Deployment > Advanced Settings.

 

 

 

Open the dropdown of the plugin, or of the "Other" category. In the case of the example, I open Redirection.

 

Track / Follow: if the table is not to be exported (because sensitive or useless data), set Follow, otherwise leave Track. Here, the log table is not interesting for export, so we remove it from exports.

Label: a nice name for the table, if you like.

 

Field Schema: search for the field you want to change. For example, for redirection_id:

 

 

"redirection_id" is defined as a reference field to the "wp_redirection_items" table.

The "Dependency" box must be checked in one particular case: if items are to be placed under their parents in the export / import interface.

This is the case for Posts + Postmeta (fig.


 

 

Configuring Processors

Processors are launched in the order shown when exporting, and in the opposite direction when importing. Please ensure that their execution does not cause any unwanted side effects.

The options are:

  • Convert GUID into this represented file: this is a specific processor for posts, applied to the post_guid field. This allows attached files to be included in the bundle.
  • Clear data on import: this allows you to remove a particular piece of data when importing an element with this processor. For example, a transient value in the options table.
  • Clear Elementor cache on import: this clears the Elementor cache, if used, when importing an element with this processor.
  • Map to import author: links the contents of the specified field to the import author specified in WP Deployer settings.
  • Transmutation: allows you to specify a location within the data itself (serialized JSON and PHP supported) and apply a predefined transformation function.
  • Strip host name from URL: searches the URLs contained in the field specified the host name of the current site, and replaces them with the host name of the site that will import the data.

 

Once everything is configured (if there was anything to do), perform a deployment between out-of-production and pre-production instances. Then import to check that everything is working.

^