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

 

  • The enable-auto-updates operation switches on auto-updates on a WordPress installation.
  • The disable-auto-updates operation switches off auto-updates on a WordPress installation.
  • The remove command uninstalls WordPress from a site.
  • The update-core command updates a WordPress installation.
  • The clear-cache command checks whether updates are available for the selected WordPress installation.
  • The activate-plugin command activates the specified plugin on the specified WordPress installation.
  • The deactivate-plugin command deactivates the specified plugin on the specified WordPress installation.
  • The uninstall-plugin command removes the specified plugin from the specified WordPress installation.
  • The update-plugin command updates the specified plugin on the specified WordPress installation.
  • The install-plugin command installs the specified plugin on the specified WordPress installation.
  • The activate-theme command activates the specified theme on the specified WordPress installation.
  • The uninstall-theme command removes the specified theme from the specified WordPress installation.
  • The update-theme command updates the specified theme on the specified WordPress installation.
  • The install-theme command installs the specified theme on the specified WordPress installation.
  • The get-list command retrieves the list of all WordPress installations on a server.
  • The get-plugin-list command retrieves the list of plugins installed on a WordPress installation.
  • The get-theme-list command retrieves the list of themes installed on a WordPress installation.
  • The search-plugins command searches for installed plugins by a plugin name.
  • The search-themes command searches for installed themes by a theme name.
  • The get-security-status operation retrieves the security status of the specified WordPress installation.

 

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><br>	<wp-instance><br>		<get-security-status><br>			<filter><br>				<id>WordPress instance ID</id><br>			</filter><br>		</get-security-status><br>	</wp-instance><br></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>
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.