Managing WordPress Installations

Operator: <wp-instance>

XML Schema: wpinstance.xsd

Plesk version: Plesk 12.0 and later

XML API version: 1.6.6.0 and later

Plesk user: Administrator, reseller, customer

Description

The wp-instance operator is used to manage WordPress installations, plugins and themes.

Supported operations

 

 

Request Examples

Retrieving a List of WordPress Installations

<packet>
    <wp-instance>
         <get-list>
         </get-list>
     </wp-instance>
</packet>

Switching On Auto-updates on a WordPress Installation

<packet>
    <wp-instance>
         <enable-auto-updates>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
         </enable-auto-updates>
     </wp-instance>
</packet>

Switching Off Auto-updates on a WordPress Installation

<packet>
    <wp-instance>
         <disable-auto-updates>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
         </disable-auto-updates>
     </wp-instance>
</packet>

Updating WordPress Installations

<packet>
    <wp-instance>
         <update-core>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
         </update-core>
     </wp-instance>
</packet>

Uninstalling WordPress

<packet>
    <wp-instance>
         <remove-instance>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
         </remove-instance>
     </wp-instance>
</packet>

Updating Cache and Retrieving Updates Information for a WordPress Installation

Note: The information about available updates will be displayed in the Plesk GUI. It will not be available in the response packet.

<packet>
    <wp-instance>
         <clear-cache>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
         </clear-cache>
     </wp-instance>
</packet>

Retrieving the result of the last security check

<packet>
<wp-instance>
<get-security-status>
<filter>
<id>WordPress instance ID</id>
</filter>
</get-security-status>
</wp-instance>
</packet>

Retrieving the List of Plugins Installed on a WordPress Installation

<packet>
    <wp-instance>
         <get-plugin-list>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
         </get-plugin-list>
     </wp-instance>
</packet>

Retrieving the List of Themes Installed on a WordPress Installation

<packet>
    <wp-instance>
         <get-theme-list>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
         </get-theme-list>
     </wp-instance>
</packet>

Searching for an Installed Plugin

<packet>
    <wp-instance>
         <search-plugins>
                  <term>search query</term>
         </search-plugins>
     </wp-instance>
</packet>

Searching for an Installed Theme

<packet>
    <wp-instance>
         <search-themes>
                  <term>search query</term>
         </search-themes>
     </wp-instance>
</packet>

Installing a Plugin

<packet>
    <wp-instance>
         <install-plugin>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>plugin ID</asset-id>
         </install-plugin>
     </wp-instance>
</packet>

Updating a Plugin

<packet>
    <wp-instance>
         <update-plugin>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>plugin ID</asset-id>
         </update-plugin>
     </wp-instance>
</packet>

Activating a Plugin

<packet>
    <wp-instance>
         <activate-plugin>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>plugin ID</asset-id>
         </activate-plugin>
     </wp-instance>
</packet>

Deactivating a Plugin

<packet>
    <wp-instance>
         <deactivate-plugin>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>plugin ID</asset-id>
         </deactivate-plugin>
     </wp-instance>
</packet>

Removing a Plugin

<packet>
    <wp-instance>
         <uninstall-plugin>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>plugin ID</asset-id>
         </uninstall-plugin>
     </wp-instance>
</packet>

Installing a Theme

<packet>
    <wp-instance>
         <install-theme>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>theme ID</asset-id>
         </install-theme>
     </wp-instance>
</packet>

Updating a Theme

<packet>
    <wp-instance>
         <update-theme>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>theme ID</asset-id>
         </update-theme>
     </wp-instance>
</packet>

Activating a Theme
<packet>
    <wp-instance>
         <activate-theme>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>theme ID</asset-id>
         </activate-theme>
     </wp-instance>
</packet>

Removing a Theme

<packet>
    <wp-instance>
         <uninstall-theme>
             <filter>
                  <id>WordPress instance ID</id>
             </filter>
             <asset-id>theme ID</asset-id>
         </uninstall-theme>
     </wp-instance>
</packet>

Retrieving a Security Status of a WordPress Installation

The following packet retrieves the security status of the installation of WordPress with ID=74.

<packet>
  <wp-instance>
    <get-security-status>
      <filter>
        <id>74</id>
      </filter>
    </get-security-status>
  </wp-instance>
</packet>