# WordPress - VXP

The WordPress VXP plugin: All-in-One Digital Asset Management and Cloudimage Acceleration.

### Overview

The **WordPress VXP** **plugin** is a powerful WordPress addition designed to help businesses efficiently manage and optimize their digital assets.\
Integrating Scaleflex two key products in one - **Digital Asset Management (DAM)** and **Cloudimage (Digital Media Optimization)** - it enables you to store, organize, deliver, and optimize images, videos, and other digital resources directly from within WordPress.

* **DAM (Digital Asset Management):** Seamlessly organize, search, and control all your digital assets, ensuring brand consistency and boosting team collaboration.
* **Cloudimage (Digital Media Optimization):** Automatically optimize images and videos for size and loading speed, enhancing user experience and improving website performance.

### Prerequisites

To use this plugin, ensure you have a Scaleflex DAM account ([register for a demo](https://www.scaleflex.com/request-a-demo) if not already) or a Cloudimage account ([register to get direct access](https://www.cloudimage.io/registration) if not already).

### Installation

{% hint style="info" %}
For installation instructions related to the Cloudimage version, please refer to [that documentation](https://docs.cloudimage.io/implementation/cms-plugins/wordpress) instead.
{% endhint %}

* Log in to your WordPress admin panel.
* *On the Admin sidebar, navigate to Plugins > Add New*
* *Enter "Scaleflex VXP" in the search field and then install the plugin*
* Once installed, click Activate.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2Ftqfanrg9deiGOtI5H8Qu%2Fimage.png?alt=media&#x26;token=24649a3a-f04a-488e-b70f-b6afd963d0a1" alt=""><figcaption></figcaption></figure>

* Navigate to the settings page.
* Select **"Digital Asset Management (DAM)"**.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FJED9JVYE2ywBgENXj3Vb%2FWP_versions.png?alt=media&#x26;token=93c3b7f2-3465-480a-b1ab-bf0117aa9aad" alt=""><figcaption></figcaption></figure>

* Fill in the plugin settings page with the required authentication details
  * **Token:** Your token from the DAM
  * **Security Template:** A key for obtaining time-limited access tokens (used for API interaction). See: [Security templates](https://docs.scaleflex.com/vxp-visual-experience-platform/settings/project/access/security-templates). Behind the scenes, the code would use the Security Template Identifier to obtain a SASS (the “limited-time password”). The SASS would then be used in the auth header for interacting with the Filerobot API (<https://developers.scaleflex.com/>)&#x20;
  * **Base folder in the DAM to synchronise assets to / from:** Choose the folder where uploaded assets should be stored in the DAM platform.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FhKTuXCVLkoNbyvoIIwSn%2Fimage.png?alt=media&#x26;token=081ee2f6-4922-41da-9e35-49290ebb4700" alt=""><figcaption></figcaption></figure>

### Setup

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F8SFcVpSOvtPeBBCxxStL%2Fimage.png?alt=media&#x26;token=37142d11-f5ce-424e-afa4-99452391e482" alt=""><figcaption></figcaption></figure>

With **Scaleflex DAM**, we have two modes of visualization:

* **DAM-Native:** Compatibility with every version of WordPress and easy to use with other plugins
* **DAM-Widget:** Supports Gutenberg (with classic blocks), Classic Editor, Yoast SEO, WooCommerce, and Advanced Custom Fields. Any other Editor or plugin using media should be validated before use.

#### **Advanced Settings**

**Storage location:** Where assets will be stored. In any case, WordPress will use optimized asset links from the DAM to display and accelerate assets in WordPress.

* **DAM Only:** activating the plugin uploads existing WordPress assets to the DAM; new assets are stored only in the DAM and require manual syncing after deactivation.
* **DAM and WordPress:** assets are duplicated between WordPress and the DAM; deactivating the plugin relinks URLs to local WordPress storage.
* **Maximum asset weight**: in order to prevent timeouts or save space on the WordPress server, you can limit the weight of assets that will be also saved to the WordPress server. Limiting the size will also make larger files unavailable in your posts or pages if you remove the Scaleflex plugin.

**Synchronize all assets from DAM to WordPress:**

Once enabled, the feature pulls DAM assets directly from the Scaleflex DAM into WordPress (without DAM metadata), simply making assets available and searchable by their `name`.

Still, a DAM metadata needs mandatorily to be selected to synchronize the attachment ID from WordPress to DAM in order to maintain unicity in WordPress database.

If you don't have any, please create one at: <https://hub.scaleflex.com/settings/dam/metadata/assets>

This custom metadata should be of type `number` and should not be edited by DAM users. The selector will pre-filter the available metadata for that purpose.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FWehK7wyp6waexTluvAu4%2Fimage.png?alt=media&#x26;token=abc99800-a891-4ca4-b7e4-6a80eed131ff" alt=""><figcaption></figcaption></figure>

#### Metadata and Webhook Configuration

You can enable this option if you want to use metadata in your project or synchronize the asset when you have a new upload from DAM.

Once enabled, the feature pulls DAM metadata directly from the Scaleflex DAM into WordPress (both default and custom metadata), also enabling advanced search and description capabilities.

New assets uploaded to the DAM (from the specified base folder) will be automatically synced to WordPress via Webhook, this time regardless of whether they are used in pages or posts.

You can select to synchronize the relevant DAM metadata you want with Title, Description, Caption, and Alternative Text (ALT) as standard WordPress metadata.

For this to happen, the only metadata needed for the WordPress to pull each and all of the DAM Asset's metadata is the `file UUID` .

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F5hOdgE53Wq848RkoHr2m%2Fmimimum%20metadata%20sync%20webhook.png?alt=media&#x26;token=73d6460d-0ce6-4b40-9892-b11a47a246e7" alt=""><figcaption></figcaption></figure>

**Example for Webhook URL:**&#x20;

```
https://yourdomain.com/wp-json/sfxvxp/dam/v1/webhook/listen-data
```

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F7E9q9bKZ97y2L8OoX3dp%2Fimage.png?alt=media&#x26;token=48ffbd24-f5a1-47a0-a178-486e07daf6c2" alt=""><figcaption></figcaption></figure>

**🔐 IMPORTANT — Application Password Required**

To ensure that the webhook works correctly, you **must** use a **WordPress Application Password** for authentication.

Application Passwords allow secure REST API access without exposing your main account password and prevent unauthorized webhook calls.

**How to Create an Application Password in WordPress**

* Step 1: Go to **Users > Profile** (or “Your Profile”).
* Step 2: Scroll down to the **Application Passwords** section.
* Step 3: Enter a name for the new password, for example:&#x20;

```
SFXVXP Webhook
```

* Step 4: Click **Add Application Password**. WordPress will generate a password — **copy and store it safely**, as you will need it when configuring the [webhook in the DAM settings](https://hub.scaleflex.com/settings/dam/automations/webhooks).

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FCyYf98PlQmLvS1LMzssB%2FDAM.png?alt=media&#x26;token=8ab0eedc-3398-49c5-be49-582ec1509a28" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F8DwpNHqFDkIYsOZeUhha%2Fapp%20pass%20webhook.png?alt=media&#x26;token=0823e674-bce7-40f1-bf67-81adaeb547d4" alt=""><figcaption></figcaption></figure>

* Step 5: Make sure your "Permalink" setting is of the correct type&#x20;

{% hint style="info" %}
If the webhook request returns **404 Not Found**, this could be the root cause
{% endhint %}

Go to **WordPress → Settings → Permalinks →** select any other than "Plain" and save

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FHeNLtCAs1x2KD2aoiigP%2FDAM%20permalink%20wordpress.png?alt=media&#x26;token=286b84df-ddd1-460c-bcb5-6365d753ab1d" alt=""><figcaption></figcaption></figure>

### What this plugin brings

For example, before DAM is installed and activated, you have these 2 images on your WordPress CMS and these 2 images on your DAM platform:

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FNnk3FgIraq5D4GJVu4na%2Fimage.png?alt=media&#x26;token=9e30ac40-dc06-4725-b586-dc0e3d36a321" alt=""><figcaption></figcaption></figure>

At this point, the images' URLs still have WordPress CMS URLs

After you install, activate, and configure DAM, you can see the notification at the top to confirm if you entered the correct credentials.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FRIMHDNqAyMYrdaDAdYeJ%2Fimage.png?alt=media&#x26;token=263103b2-cdc2-4d22-82cf-bc0c9258edf5" alt=""><figcaption></figcaption></figure>

Then the synchronization will run in the background and upload your current asset into **Scaleflex DAM.**

You can check the progress synchronization at the "Report" page

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FP5VHPr9QakW8KESvn56H%2Fimage.png?alt=media&#x26;token=5f345b4d-1295-43a7-a3b9-538766102d43" alt=""><figcaption></figcaption></figure>

Now you can see that all the images' URLs have become DAM URLs

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FgbLgdok7IehydALL4dA3%2Fimage.png?alt=media&#x26;token=8ca67c3d-c5d4-4f12-a339-9de192e8aa38" alt=""><figcaption></figcaption></figure>

**The next major feature that Scaleflex DAM brings is the Media Asset Widget as Media Library**

Here you can upload your media assets to the DAM platform (instead of WordPress local library)

**Note:** This feature supports natively Gutenberg, Classic Editor, Yoast SEO, WooCommerce, and Advanced Custom Fields (with others to be added soon).

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FqXevyXiGWTng08q5xKVK%2FWP-library.png?alt=media&#x26;token=441d690f-f03f-4668-ba5c-e5f3d48b9f2c" alt=""><figcaption></figcaption></figure>

**Anywhere the Media Asset Manager is called by an editor, a Scaleflex DAM media tab will be visible.**

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F6SdSZk7XopOb54WP1Uw2%2FWP-insert.png?alt=media&#x26;token=02a12146-e547-43b5-991c-6cf88ecfda7d" alt=""><figcaption></figcaption></figure>

### **Deactivation**

When you deactivate the plugin, all media assets that have been synchronized to the DAM will not be available anymore as "CDN links".

You have two options when deactivating the plugin, and what happens next will be depending on the one chosen:

1. Delete all plugin data

* this option revoves all configuration parameters and CDN links from the Wordpress database
* if you selected for `storage` "DAM only":&#x20;
  * all articles (and other posts) will then have broken images unless they are manually replaced
* if you selected for `storage` "DAM and Wordpress":
  * a background process will map and assign all available local media to articles (and other posts)

2. Keep all plugin data

* this option simply removes the plugin from the active ones, and does not modify the articles links

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FtIhm3SldvxxiAbYuYkMZ%2Fremoval%20od%20DAM.png?alt=media&#x26;token=ea7be57a-7642-4550-b8a3-f13038e1b0b6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Please note:** When using the "**Storage location"** with the option **"DAM only"**, you need to manually synchronize back to WordPress each of your DAM asset **after** deactivation.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scaleflex.com/digital-asset-management-dam/plugins-and-connectors/plugins/wordpress-vxp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
