Description

This function checks the status of a scan and reports the results if the system completed the scan.

 To read more information about the complete scan process, read our UAPI Functions - WordPressInstanceManager::start_scan  documentation.

You must install the WordPress Manager cPanel plugin to access this API function.


Examples 




https://hostname.example.com:2083/cpsess##########/execute/WordPressInstanceManager/get_scan_results



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Retrieve WordPress scan log results.
 $instances = $cpanel->uapi(
    'WordPressInstanceManager', 'get_scan_results'
);



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Retrieve WordPress scan log results.
my $instances = $cpliveapi->uapi(
    'WordPressInstanceManager', 'get_scan_results'
);



<!-- Retrieve WordPress scan log results. -->
[% data = execute( 'WordPressInstanceManager', 'get_scan_results' ); %]



uapi --user=username WordPressInstanceManager get_scan_results



{
      "errors": null,
      "metadata": {},
      "status": 1,
      "data": {
            "errors": [],
            "instances": [{
                  "addon_type": "modern",
                  "rel_path": "public_html",
                  "domain": "example.com",
                  "homedir": "/home/example",
                  "db_server": "localhost",
                  "db_username": "example_wp1",
                  "current_version": "4.9.5",
                  "admin_url": "example.com/wp-login.php",
                  "site_url": "example.com",
                  "db_prefix": "wp",
                  "db_name": "example_wp1",
                  "available_version": "4.9.5",
                  "initial_install_version": "4.9.5",
                  "full_path": "/home/example/public_html",
                  "admin_username": "admin",
                  "id": "cPanel__Blogs__WordPressX.0.1525876559",
                  "addon_config": "/home/example/.cpaddons/cPanel::Blogs::WordPressX.0.yaml",
                  "db_type": "mysql",
                  "addon_name": "cPanel::Blogs::WordPressX"
            }],
            "is_running": 0
      },
      "warnings": null,
      "messages": null
}



Parameters

This function does not accept parameters.

Returns


ReturnTypeDescriptionPossible valuesExample
errorsarrayThis array contains the errors that the system experienced while it scanned for instances.  
is_runningBoolean

Whether the system detects an active scan.

To read more information about the complete scan process, read our UAPI Functions - WordPressInstanceManager::start_scan documentation.


  • 1 — Scan active.
  • 0 — No scan active.
0
instancesarray of hashes

An array that contains the WordPress© instance information.

The function does not return this array if it finds that an active scan in progress.


Each hash contains the addon_config, addon_name, addon_type, admin_url, admin_username, available_version, current_version, db_name, db_prefix, db_server, db_type, db_username, domain, full_path, homedir, id, initial_install_version, rel_path, and site_url returns.


addon_config

string

The WordPress instance's configuration file's location.

The function returns this value in the instances array of hashes.

An absolute filepath.


/home/example/.cpaddons/cPanel::Blogs::WordPressX.0.yaml


addon_name

string

The WordPress cPAddon that installed the instance.

The function returns this value in the instances array of hashes.

  • cPanel::Blogs::WordPress

  • cPanel::Blogs::WordPressX

cPanel::Blogs::WordPressX

addon_type

string

The type of WordPress cPAddon that installed the instance.

The function returns this value in the instances array of hashes.

  • modern
  • legacy

modern

admin_url

string

The URL to the instance's administration interface.

The function returns this value in the instances array of hashes.

A valid URL.

example.com/wp-login.php

admin_username

string

The administrator username that the installer created at the time of installation.

The function returns this value in the instances array of hashes.

A valid string.admin

available_version

string

The latest Wordpress's version.

The function returns this value in the instances array of hashes.



A WordPress version number. 4.9.5

current_version

string

The WordPress instance's installed version.

The function returns this value in the instances array of hashes.


null

4.9.5

db_name

string

The WordPress instance's database name.

This function returns this value in the instances array of hashes.

A database name.example_wp1

db_prefix

string

The WordPress instance's database prefix.

The function returns this value in the instances array of hashes.

A database table prefix.wp

db_server

string

The WordPress instance's database name.

The function returns this value in the instances array of hashes.

A valid hostname.localhost

db_type

string

The WordPress instance's database type.

The function returns this value in the instances array of hashes.

  • mysql
  • postgres
mysql

db_username

string

The WordPress instance's database username.

The function returns this value in the instances array of hashes.

A database username.example_wp1

domain

string

The WordPress instance's installation domain.

The function returns this value in the instances array of hashes.

A domain that the cPanel account owns.example.com

full_path

string

The WordPress instance's full installation path.

The function returns this value in the instances array of hashes.

An absolute filepath.

/home/example/public_html

 

homedir

string

The cPanel account's home directory.

The function returns this value in the instances array of hashes.

An absolute filepath./home/example

id

string

The instance's unique identifier.

The function returns this value in the instances array of hashes.

A valid string.

cPanel__Blogs__WordPressX.0.1525876559

initial_install_version

string

The instance's version at installation.

The function returns this value in the instances array of hashes.

A WordPress version number.4.9.5

rel_path

string

The WordPress instance's domain installation path.

The function returns this value in the instances array of hashes.

A valid filepath, relative to the domain's document root.public_html

site_url

string

The WordPress instance's home page URL.

The function returns this value in the instances array of hashes.

A valid URL.

example.com