Cpanel::API::WP
A module providing functionality to provide a wrapper around the WordPress API
use Cpanel::API::WP;
my $result = Cpanel::API::execute_or_die( 'WP', 'call', ... );
ARGUMENTS
Optional. Limit the number of result to return.
OUTPUT
info
The total number of domains existing for the account.
Number of domains returns as part of that API call.
Should we disoplay the first time onboarding experience for the user.
Total number of WordPress instances/websites the user is authorized to create.
Note: this is set to '-1' when there is no limit.
THROWS
EXAMPLES
* List all domains
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP list_domains
uapi --user=cpuser --output=jsonpretty WP list_domains limit=3
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"func" : "list_domains",
"module" : "WP",
"result" : {
"data" : {
"domains" : [
{
"admin_email" : "admin@june-first.test",
"blogdescription" : "new month",
"blogname" : "June 1st",
"current_theme" : "Blockpress",
"documentroot" : "/home/junefirst/public_html/june-first.test",
"domain" : "june-first.test",
"is_main_domain" : 1,
"issues" : [],
"labels" : [],
"siteurl" : "https://june-first.test",
"status" : "",
"template" : "blockpress",
"updates" : {
"amountOfPluginsWithUpdates" : 0,
"amountOfThemesWithUpdates" : 0,
"applicable" : true,
"autoUpdatesAvailable" : true,
"availableVersion" : null,
"php" : {
"applicable" : true,
"available" : true,
"taskStatus" : "notExist"
},
"smart" : {
"applicable" : true,
"available" : true,
"initiatedByAutoUpdater" : false,
"promoAvailable" : false,
"status" : false,
"taskStatus" : "notExist"
}
},
"wptk_id" : 118
}
],
"info" : {
"first_time_experience" : 0,
"max_instances_authorized" : -1,
"results" : 2,
"total" : 2
}
},
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
}
}
Returns the information for a single instance.
ARGUMENTS
Required. Provide the instance_id
EXAMPLES
* Get information for a single instance id
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP get_instance id=42
The returned data will contain a structure similar to the JSON below:
{
"func" : "get_instance",
"module" : "WP",
"apiversion" : 3,
"result" : {
"messages" : null,
"warnings" : null,
"status" : 1,
"errors" : null,
"metadata" : {},
"data" : {
"admin_email" : "admin@xpress.net",
"blogdescription" : "TagItOrNot",
"blogname" : "My title",
"domain" : "xpress.net",
"issues" : []
"labels" : [],
"siteurl" : "https://xpress.net",
"template" : "twentytwentythree",
"wptk_id" : "29",
"wp_version" : "6.2",
}
}
}
Add a domain and WP Toolkit website for it. This is running a Cpanel::UserTask which can be monitored using the sse_url returned.
ARGUMENTS
Required. The name of the domain to add. Example: "mydomain.tld"
Required. The title of the WordPress website.
Optional. The tagline of the WordPress website. This will be set to an empty string if it is not provided.
Required. The name of the theme to enable for the wordpress website.
EXAMPLES
* Adding a domain
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP add_domain domain="mydomain.tld" \
title="My Title" tagline="TagLine" theme="theme"
The returned data will contain a structure similar to the JSON below: Noe that it contains the sse_url to track the action.
{
"result" : {
"messages" : null,
"warnings" : null,
"errors" : null,
"metadata" : {},
"status" : 1,
"data" : {
"task_id" : "00000000/63d7f020927f8f",
"task" : {
"sse_url" : "/sse/UserTasks/00000000_63d7f020927f8f/wp_1675096096.59918_add_domain.mydomain.tld.log",
"action" : "add_domain",
"args" : {
"site_settings_json" : "{\"theme\":\"theme\",\"title\":\"My Title\",\"tagline\":\"TagLine\"}",
"log_file" : "/home/cpuser/.cpanel/logs/wp_1675096096.59918_add_domain.mydomain.tld.log",
"domain" : "addon6.tld"
},
"subsystem" : "WordPress"
}
}
},
"apiversion" : 3,
"module" : "WP",
}
Clone an existing instance id to a new domain.
The WPTK instance needs to exist and owned by the user. The domain should not exist.
You should then use the 'sse_url' to track the progression of cloning process.
ARGUMENTS
Required. The source instance id to use for cloning.
Required. The target domain where to install the new WPTK instance. Example: "clone-it-there.tld"
EXAMPLES
* Clonin an instance to a new domain
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP clone_instance id=42 domain=cloneit-7.tld
The returned data will contain a structure similar to the JSON below: Noe that it contains the sse_url to track the action.
{
"func" : "clone_instance",
"result" : {
"status" : 1,
"metadata" : {},
"errors" : null,
"warnings" : null,
"data" : {
"task" : {
"subsystem" : "WordPress",
"args" : {
"instance_id" : "60",
"log_file" : "/home/xpress/.cpanel/logs/wp_1675446198.87724_clone_instance.60.cloneit7.tld.log",
"domain" : "cloneit-7.tld"
},
"sse_url" : "/sse/UserTasks/00000000_63dd47b6d65b7f/wp_1675446198.87724_clone_instance.60.cloneit7.tld.log",
"action" : "clone_instance"
},
"task_id" : "00000000/63dd47b6d65b7f"
},
"messages" : null
},
"module" : "WP",
"apiversion" : 3
}
Note that it contains one sse_url to track the progression of the cloning progress.
Delete a wordpress addon domain.
ARGUMENTS
You should either provide the instance id or the domain name.
Optional. The wp toolkit instance id. Note: Need at minimum to provide the id or domain argument.
Optional. Alias to id.
Optional. The domain name (example: "your-domain.tld" ) Note: Need at minimum to provide the id or domain argument.
EXAMPLES
* Remove a domain using the instance id
uapi --user=cpuser --output=jsonpretty WP delete_domain id=42
uapi --user=cpuser --output=jsonpretty WP delete_domain instance_id=42
* Remove a domain using the domain name
uapi --user=cpuser --output=jsonpretty WP delete_domain domain="your-domain.tld"
The returned data will contain a structure similar to the JSON below:
{
"func" : "delete_domain",
"module" : "WP",
"result" : {
"warnings" : null,
"status" : 1,
"messages" : null,
"errors" : null,
"metadata" : {},
"data" : {
"reason" : "The subdomain “zxdom-1.tld.xpress.net” has been removed."
}
},
"apiversion" : 3
}
update title and tagline
Warning: when the 'is_first_time' boolean is set to a 'true' value this is then triggering set_title_and_tagline_sse. The SSE event should then be check.
ARGUMENTS
You should either provide the title and optionaly the tagline.
For the onboard experience you can also provide is_first_time=1 too.
Optional. The wp toolkit instance id. This is optional for the 'is_first_time' otherwise this is required.
Required. The blog title
Optional. The blog tagline
Optional. Is it the first time onboarding experience? Setting it to true would allow to bypass the onboarding experience
EXAMPLES
* OnBoard Experience
uapi --user=cpuser --output=jsonpretty WP set_title_and_tagline title="My title" tagline="TagItOrNot" is_first_time=1
* Update title and/or tagline
uapi --user=cpuser --output=jsonpretty WP set_title_and_tagline instance_id=29 title="My title"
uapi --user=cpuser --output=jsonpretty WP set_title_and_tagline instance_id=29 title="My title" tagline="TagItOrNot"
The returned data will contain a structure similar to the JSON below:
{
"func" : "set_title_and_tagline",
"result" : {
"messages" : null,
"data" : "Blog Title Updated Successfully.",
"errors" : null,
"warnings" : null,
"metadata" : {},
"status" : 1
},
"module" : "WP",
"apiversion" : 3
}
update title and tagline using a User task.
ARGUMENTS
You should either provide the title and optionnaly the tagline.
For the onboard experience you can also provide is_first_time=1 too.
Required. The wp toolkit instance id.
Required. The blog title
Optional. The blog tagline
Optional. Is it the first time onboarding experience? Setting it to true would allow to bypass the onboarding experience
EXAMPLES
* OnBoard Experience
uapi --user=cpuser --output=jsonpretty WP set_title_and_tagline_sse title="My title" tagline="TagItOrNot" is_first_time=1
* Update title and/or tagline
uapi --user=cpuser --output=jsonpretty WP set_title_and_tagline_sse instance_id=29 title="My title"
uapi --user=cpuser --output=jsonpretty WP set_title_and_tagline_sse instance_id=29 title="My title" tagline="TagItOrNot"
The returned data will contain a structure similar to the JSON below:
{
"func" : "set_title_and_tagline_sse",
"apiversion" : 3,
"module" : "WP",
"result" : {
"errors" : null,
"data" : {
"task" : {
"args" : {
"log_file" : "/home/cpuser/.cpanel/logs/wp_1677535844.22245_initaldomainsetupperform.1677535844.log",
"tagline" : "",
"title" : "For the main site My title"
},
"action" : "perform",
"sse_url" : "/sse/UserTasks/00000000_63fd2a643683dc/wp_1677535844.22245_initaldomainsetupperform.1677535844.log",
"subsystem" : "WordPress::InitialDomainSetup"
},
"task_id" : "00000000/63fd2a643683dc"
},
"warnings" : null,
"metadata" : {},
"messages" : null,
"status" : 1
}
}
Check if we are in the first time experience workflow or not.
ARGUMENTS
none
RESULT
* is_first_time
1 when the first time experience should be displayed 0 when the first time experience was already performed.
EXAMPLES
* Update theme for an instance
uapi --user=cpuser --output=jsonpretty WP is_first_time_experience
The returned data will contain a structure similar to the JSON below:
{
"result" : {
"metadata" : {},
"status" : 1,
"messages" : null,
"warnings" : null,
"errors" : null,
"data" : {
"is_first_time" : 1
}
},
"module" : "WP",
"apiversion" : 3,
"func" : "is_first_time_experience"
}
Uses the Google https://pagespeed.web.dev/ API to determine site performance of the main page. This is a lighter version of get_site_performance_full which returns the whole data.
If you call this API with force=true, it will wait for the cache to be updated if it is out of date before returning the information.
ARGUMENTS
Required. The element Unique ID you are trying to add the tag to.
Waits for the information to be refreshed before the API returns.
EXAMPLES
* Get site info. Wait for a valid cache before returning
uapi --user=cpuser --output=jsonpretty WP get_site_performance instance_id=2 force=1
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"func" : "get_site_performance",
"module" : "WP",
"result" : {
"data" : {
"QUERIED_SITE" : "https://wordpress.test",
"_cache_cached_at" : 1679436748,
"_cache_expires_at" : 1710972748,
"desktop" : {
"performance" : {
"score" : 0.93
}
},
"mobile" : {
"performance" : {
"score" : 0.73
}
}
},
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
}
}
Uses the Google https://pagespeed.web.dev/ API to determine site performance of the main page.
Gives back local cached information but if the information is older than an hour, it queues a task to update the information for the next query.
If you call this API with force=true, it will wait for the cache to be updated if it is out of date before returning the information.
ARGUMENTS
Required. The element Unique ID you are trying to add the tag to.
Waits for the information to be refreshed before the API returns.
EXAMPLES
* Get site info. Wait for a valid cache before returning
uapi --user=cpuser --output=jsonpretty WP get_site_performance_full instance_id=2
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"func" : "get_site_performance_full"
"module" : "WP",
"result" : {
"errors" : null,
"warnings" : null,
"messages" : null,
"metadata" : {},
"data" : {
"QUERIED_SITE" : "https://your-domain.test",
"_cache_cached_at" : 1678491552,
"_cache_expires_at" : 1710027552,
"DESKTOP_PAGESPEED" : {
// ... Stuff given back by the google API (big blog)
}
"MOBILE_PAGESPEED" : {
// ... Stuff given back by the google API (big blog)
}
},
"status" : 1
}
}
Retrieve the daily statistics from AwStats for one WP Toolkit instance.
ARGUMENTS
Required. The element Unique ID you are trying to add the tag to.
EXAMPLES
* Get daily stats for the last ~30 days
uapi --user=cpuser --output=jsonpretty WP get_stats_daily id=ID
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"func" : "get_stats_daily",
"module" : "WP",
"result" : {
"data" : {
"domain" : "cyclone.tld",
"instance_id" : 210,
"stats" : {
"2023-02-01" : {
"bandwidth" : 81110,
"hits" : 6,
"pages" : 6,
"visits" : 5
},
"2023-02-02" : {
"bandwidth" : 888296,
"hits" : 43,
"pages" : 14,
"visits" : 7
},
...
}
},
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
}
}
Retrieve the sumup statistics from AwStats for one WP Toolkit instance. 7-days highlight with the trend.
ARGUMENTS
Required. The element Unique ID you are trying to add the tag to.
REPLY
Note: 'delta' is an integer, can be positive, negative or null. When we do not have enough stats from the past to compute the trend, then the value 'undef' is used to indicate: 'we cannot compute the delta'.
EXAMPLES
* Get 7-day highlight statistics
uapi --user=cpuser --output=jsonpretty WP get_stats_highlights id=ID
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"func" : "get_stats_highlights",
"module" : "WP",
"result" : {
"data" : {
"domain" : "cyclone.tld",
"instance_id" : 210,
"stats" : {
"bandwidth" : {
"delta" : 37.12,
"total" : 136840
},
"hits" : {
"delta" : 68.29,
"total" : 28
},
"pages" : {
"delta" : 70,
"total" : 28
},
"visits" : {
"delta" : 75.86,
"total" : 22
}
}
},
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
}
}
Generic API call to add a tag to any elements: 'theme', 'plugin', 'website'.
ARGUMENTS
Required. The type of tag 'theme', 'plugin' or 'website'.
Required. The tag name. (Can provide one or multiple)
Required. The element Unique ID you are trying to add the tag to.
EXAMPLES
* Adding tags
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP add_tags_to type=theme id=themeslug tag=mytag
uapi --user=cpuser --output=jsonpretty WP add_tags_to type=plugin id=pluginname tag=mytag
uapi --user=cpuser --output=jsonpretty WP add_tags_to type=website id=654321 tag=mytag
* Add multiple tags
uapi --user=cpuser --output=jsonpretty WP add_tags_to type=theme id=themeslug tag=mytag tag=two
uapi --user=cpuser --output=jsonpretty WP add_tags_to type=plugin id=pluginname tag=mytag tag=two
uapi --user=cpuser --output=jsonpretty WP add_tags_to type=website id=654321 tag=mytag tag=two
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "add_tags_to",
"result" : {
"messages" : null,
"metadata" : {},
"data" : {
"txt" : "some message",
"tags" : [
"first-tag",
"second-tag"
],
}.
"errors" : null,
"status" : 1,
"warnings" : null
},
"apiversion" : 3
}
Add a tag to a theme.
ARGUMENTS
Required. The tag name. (Can provide one or multiple)
Required. The element Unique ID you are trying to add the tag to.
EXAMPLES
* Add tag to a theme
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP add_tags_to_theme id=themeslug tag=mytag
* Add multiple tags
uapi --user=cpuser --output=jsonpretty WP add_tags_to_theme id=themeslug tag=t-one tag=t-two
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "add_tags_to_theme",
"result" : {
"messages" : null,
"metadata" : {},
"data" : {
"tags" : [
"first-tag",
"second-tag"
],
txt: "Tag 'mytag' added to theme 'xxxx'",
}.
"errors" : null,
"status" : 1,
"warnings" : null
},
"apiversion" : 3
}
Add a tag to a plugin.
ARGUMENTS
Required. The tag name. (Can provide one or multiple)
Required. The element Unique ID you are trying to add the tag to.
EXAMPLES
* Add tag to a plugin
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP add_tags_to_plugin id=themeslug tag=mytag
* Add multiple tags
uapi --user=cpuser --output=jsonpretty WP add_tags_to_plugin id=themeslug tag=t-one tag=t-two
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "add_tags_to_plugin",
"result" : {
"messages" : null,
"metadata" : {},
"data" : {
"tags" : [
"first-tag",
"second-tag"
],
txt: "Tag 'mytag' added to plugin 'xxxx'",
}.
"errors" : null,
"status" : 1,
"warnings" : null
},
"apiversion" : 3
}
Add a tag to a website.
ARGUMENTS
Required. The tag name. (Can provide one or multiple)
Required. The element Unique ID you are trying to add the tag to. For a website, you should provide the website instance id.
EXAMPLES
* Add tag to a plugin
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP add_tags_to_website id=42 tag=mytag
* Add multiple tags
uapi --user=cpuser --output=jsonpretty WP add_tags_to_website id=42 tag=t-one tag=t-two
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "add_tags_to_website",
"result" : {
"messages" : null,
"metadata" : {},
"data" : {
"tags" : [
"first-tag",
"second-tag"
],
txt: "Tag 'mytag' added to website 'xxxx'",
}.
"errors" : null,
"status" : 1,
"warnings" : null
},
"apiversion" : 3
}
Generic API call to get tags for any elements 'theme', 'plugin', 'website'.
ARGUMENTS
Required. The type of tag 'theme', 'plugin' or 'website'.
Required. The element Unique ID you are trying to get tags from.
EXAMPLES
* Get tags for a theme, plugin or website
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP get_tags_for type=theme id=themeslug
uapi --user=cpuser --output=jsonpretty WP get_tags_for type=plugin id=pluginname
uapi --user=cpuser --output=jsonpretty WP get_tags_for type=website id=666
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"result" : {
"warnings" : null,
"metadata" : {
"transformed" : 1
},
"data" : [
"first-tag",
"second-tag"
],
"status" : 1,
"errors" : null,
"messages" : null
},
"func" : "get_tags_for",
"module" : "WP"
}
Get tags for a theme.
ARGUMENTS
Required. The element Unique ID you are trying to get tags from.
EXAMPLES
* Get tags for a theme
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP get_tags_for_theme id=themeslug
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"result" : {
"warnings" : null,
"metadata" : {
"transformed" : 1
},
"data" : [
"first-tag",
"second-tag"
],
"status" : 1,
"errors" : null,
"messages" : null
},
"func" : "get_tags_for_theme",
"module" : "WP"
}
Get tags for a plugin.
ARGUMENTS
Required. The element Unique ID you are trying to get tags from.
EXAMPLES
* Get tags for a plugin
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP get_tags_for_plugin id=pluginname
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"result" : {
"warnings" : null,
"metadata" : {
"transformed" : 1
},
"data" : [
"first-tag",
"second-tag"
],
"status" : 1,
"errors" : null,
"messages" : null
},
"func" : "get_tags_for_plugin",
"module" : "WP"
}
Get tags for a website.
ARGUMENTS
Required. The element Unique ID you are trying to get tags from. Use the WP Toolkit website.
EXAMPLES
* Get tags for a website
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP get_tags_for_website id=666
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"result" : {
"warnings" : null,
"metadata" : {
"transformed" : 1
},
"data" : [
"first-tag",
"second-tag"
],
"status" : 1,
"errors" : null,
"messages" : null
},
"func" : "get_tags_for_website",
"module" : "WP"
}
Rename an existing tag to a different wording. Note: tag labels are shared accross all types (themes, websites, plugins).
ARGUMENTS
Required. The current name of the tag.
Required. The new name of the tag.
EXAMPLES
* Rename a tag
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP rename_tag current_name=mytag new_name=xfoo
The returned data will contain a structure similar to the JSON below:
{
"result" : {
"warnings" : null,
"errors" : null,
"status" : 1,
"data" : "Tag 'mytag' was renamed to 'xfoo'",
"messages" : null,
"metadata" : {}
},
"apiversion" : 3,
"func" : "rename_tag",
"module" : "WP"
}
Remove one or more tags from an element. (note this is not deleting the tag itself)
ARGUMENTS
Required. The type of tag 'theme', 'plugin' or 'website'.
Required. The element Unique ID you are trying to remove the tag from.
Required. The tag label you are trying to remove. (Can provide one or more 'tag' entries)
EXAMPLES
* Remove a tag
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP remove_tags_from type=theme id=themeslug tag=mytag
uapi --user=cpuser --output=jsonpretty WP remove_tags_from type=plugin id=pluginname tag=mytag
uapi --user=cpuser --output=jsonpretty WP remove_tags_from type=website id=12345 tag=mytag
* Remove multiple tags
uapi --user=cpuser --output=jsonpretty WP remove_tags_from type=theme id=themeslug tag=mytag tag=anothertag
uapi --user=cpuser --output=jsonpretty WP remove_tags_from type=plugin id=pluginname tag=mytag tag=anothertag
uapi --user=cpuser --output=jsonpretty WP remove_tags_from type=website id=12345 tag=mytag tag=anothertag
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"result" : {
"messages" : null,
"data" : {
"tags" : [
"first-tag",
"second-tag"
],
}.
"status" : 1,
"metadata" : {},
"warnings" : null,
"errors" : null
},
"func" : "remove_tags_from",
"apiversion" : 3
}
Remove one or more tags from a theme. (note this is not deleting the tag itself)
ARGUMENTS
Required. The element Unique ID you are trying to remove the tag from.
Required. The tag label you are trying to remove.
EXAMPLES
* Remove a tag from a theme
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP remove_tags_from_theme id=themeslug tag=onetag
* Remove multiple tags
uapi --user=cpuser --output=jsonpretty WP remove_tags_from_theme id=themeslug tag=onetag tag=aonther
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"result" : {
"messages" : null,
"data" : {
"tags" : [
"first-tag",
"second-tag"
],
}.
"status" : 1,
"metadata" : {},
"warnings" : null,
"errors" : null
},
"func" : "remove_tag",
"apiversion" : 3
}
Remove one or more tags from a plugin. (note this is not deleting the tag itself)
ARGUMENTS
Required. The element Unique ID you are trying to remove the tag from.
Required. The tag label you are trying to remove.
EXAMPLES
* Remove a tag from a plugin
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP remove_tags_from_plugin id=pluginname tag=onetag
* Remove multiple tags
uapi --user=cpuser --output=jsonpretty WP remove_tags_from_plugin id=pluginname tag=onetag tag=another
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"result" : {
"messages" : null,
"data" : {
"tags" : [
"first-tag",
"second-tag"
],
}.
"status" : 1,
"metadata" : {},
"warnings" : null,
"errors" : null
},
"func" : "remove_tag",
"apiversion" : 3
}
Remove one or more tags from a website. (note this is not deleting the tag itself)
ARGUMENTS
Required. The element Unique ID you are trying to remove the tag from.
Required. The tag label you are trying to remove.
EXAMPLES
* Remove a tag from a website
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP remove_tags_from_website id=12345 tag=onetag
* Remove multiple tags
uapi --user=cpuser --output=jsonpretty WP remove_tags_from_website id=12345 tag=onetag tag=another
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"result" : {
"messages" : null,
"data" : {
"tags" : [
"first-tag",
"second-tag"
],
}.
"status" : 1,
"metadata" : {},
"warnings" : null,
"errors" : null
},
"func" : "remove_tag",
"apiversion" : 3
}
Update worpress theme: install and activate it.
ARGUMENTS
Required. The wp toolkit instance id.
Required. The theme slug to install example: twentytwenty
EXAMPLES
* Update theme for an instance
uapi --user=cpuser --output=jsonpretty WP set_theme instance_id=50 theme="twentynineteen"
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "set_theme"
"apiversion" : 3,
"result" : {
"data" : "Theme Updated Successfully.",
"metadata" : {},
"status" : 1,
"messages" : null,
"warnings" : null,
"errors" : null
},
}
Install a wordpress theme (and by default do not activate it). You can select if you want to activate it or not.
ARGUMENTS
Required. The wp toolkit instance id.
Required. The theme slug to install example: twentytwenty
Optional: Set to true to activate the theme. Default is false to do not activate it.
EXAMPLES
* Install a theme but do not activate it
uapi --user=cpuser --output=jsonpretty WP install_theme instance_id=50 theme="twentynineteen"
* Install a theme and activate it
uapi --user=cpuser --output=jsonpretty WP install_theme instance_id=50 theme="twentynineteen" activate=1
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "set_theme"
"apiversion" : 3,
"result" : {
"data" : "Theme Updated Successfully.",
"metadata" : {},
"status" : 1,
"messages" : null,
"warnings" : null,
"errors" : null
},
}
Delete a theme from a WPTK instance. Note: you cannot delete an active theme.
ARGUMENTS
Required. Provide the instance_id
Required. The theme slug (unique id).
EXAMPLES
* deleting a theme
uapi --user=user --output=jsonpretty WP delete_theme id=ID theme=twentynineteen
{
"module" : "WP",
"func" : "delete_theme",
"apiversion" : 3,
"result" : {
"warnings" : null,
"errors" : null,
"data" : "Theme ”twentynineteen” has been deleted:\nDeleted 'twentynineteen' theme.\nSuccess: Deleted 1 of 1 themes.\n",
"status" : 1,
"metadata" : {},
"messages" : null
}
}
* You cannot delete an active theme
{
"module" : "WP",
"apiversion" : 3,
"func" : "delete_theme",
"result" : {
"metadata" : {},
"messages" : null,
"warnings" : null,
"errors" : [
"Warning: Can't delete the currently active theme: twentynineteen\nError: No themes deleted.\n"
],
"data" : null,
"status" : 0
}
}
Search and List public WordPress Themes.
ARGUMENTS
Optional. Maxiumum number of themes to return. (Default 24)
Optional. The page number you are iteratiing on, (Default 1)
Optional. The search query string/
Optional. One of thr following: "new", "popular", "featured", "updated" ( default to popular )
Optional. Add the theme homepage to the reply. (default false)
EXAMPLES
* Fetching some themes
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes per_page=2 page=5
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes search=Twenty
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes browse=new
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes browse=popular
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes browse=featured
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes browse=updated
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes browse=new
uapi --user=cpuser --output=jsonpretty WP fetch_public_themes show_description=1
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"result" : {
"metadata" : {},
"data" : {
"themes" : [
{
"preview_url" : "https://wp-themes.com/consus/",
"rating" : 0,
"num_ratings" : 0,
"name" : "Consus",
"slug" : "consus",
"version" : "1.0.3",
"screenshot_url" : "//ts.w.org/wp-content/themes/consus/screenshot.jpg?ver=1.0.3",
"author" : "extendthemes"
},
{
"author" : "automattic",
"screenshot_url" : "//ts.w.org/wp-content/themes/upsidedown/screenshot.png?ver=1.0.0",
"name" : "Upsidedown",
"version" : "1.0.0",
"slug" : "upsidedown",
"num_ratings" : 0,
"rating" : 0,
"preview_url" : "https://wp-themes.com/upsidedown/"
}
],
"cli_status" : 1,
"info" : {
"pages" : 2749,
"results" : 5498,
"page" : 1
}
},
"status" : 0,
"messages" : null,
"warnings" : null,
"errors" : null
},
"apiversion" : 3,
"func" : "fetch_public_themes"
}
Default list of themes to display when creating a new website.
ARGUMENTS
EXAMPLES
* Fetching some themes
uapi --user=cpuser --output=jsonpretty WP get_default_themes
The returned data will contain a structure similar to the JSON below:
{ "module" : "WP", "apiversion" : 3, "func" : "get_default_themes", "result" : { "warnings" : null, "errors" : null, "metadata" : {}, "data" : { "themes" : [ { "preview_url" : "https://wp-themes.com/saasify/", "num_ratings" : 0, "rating" : 0, "author" : "blockify", "slug" : "saasify", "name" : "Saasify", "homepage" : "https://wordpress.org/themes/saasify/", "screenshot_url" : "//ts.w.org/wp-content/themes/saasify/screenshot.png?ver=0.0.2", "description" : "Modern full site editing child theme for Blockify. Perfect for SaaS companies, startups, agencies, freelancer portfolios, crypto or any digital product or service business.", "version" : "0.0.2", "template" : "blockify" },
...
}
"status" : 1,
"messages" : null
}
}
Update a single theme from wordpress.com
ARGUMENTS
Required. Provide the instance_id
Required. The name of the theme you need updated.
EXAMPLES
* getting plugin updates.
Then run the uapi call:
uapi --output=jsonpretty --user=foobar WP update_theme id=1 theme=twentytwentytwo
The returned data will contain a structure similar to the JSON below:
{
"func" : "update_theme",
"module" : "WP",
"apiversion" : 3,
"result" : {
"status" : 1,
"messages" : null,
"errors" : null,
"warnings" : null,
"metadata" : {},
"data" : "Theme twentytwentytwo has been updated:\nSuccess: Theme already updated.\n"
}
}
Get WordPress auto-update settings for plugins, themes, core, or all.
ARGUMENTS
Required. Provide the instance_id
Required. The update types you need information on.
Valid values are: 'plugins', 'themes', 'core', 'all'
Note: 'plugin' and 'theme' (singular) are also supported.
EXAMPLES
* getting theme updates.
Then run the uapi call:
uapi --output=jsonpretty --user=foobar WP get_auto_update_settings id=1 type=all
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP"
"apiversion" : 3,
"func" : "get_auto_update_settings",
"result" : {
"data" : {
"wptk_id" : 1
"domain" : "foobar.tld",
"core" : {
"auto_update_core_major" : 1,
"auto_update_core_minor" : 1
},
"theme" : {
"twentytwentythree" : 1
},
"plugin" : {
"akismet" : 1,
"classic-widgets" : "0",
"buddypress" : 1,
"health-check" : "0",
"gutenberg" : "0",
"performance-lab" : "0",
"jetpack" : "0"
},
},
"warnings" : null,
"metadata" : {},
"status" : 1,
"errors" : null,
"messages" : null
},
}
Set a single theme auto-update setting to on/off
ARGUMENTS
Required. Provide the instance_id
Required. The name of the theme you want to change.
Required. Enable or disable the auto-update setting.
Valid values are: 1/0
EXAMPLES
* getting theme updates.
Then run the uapi call:
uapi --output=jsonpretty --user=foobar WP set_theme_auto_update id=1 theme=twentytwentytwo enabled=1
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "set_theme_auto_update",
"apiversion" : 3,
"result" : {
"errors" : null,
"metadata" : {},
"messages" : null,
"warnings" : null,
"data" : "Theme twentytwentytwo autoupdate settings set to true.",
"status" : 1
},
}
Get information about all installed themes.
ARGUMENTS
Required. Provide the instance_id
EXAMPLES
* getting plugin updates.
Then run the uapi call:
uapi --output=jsonpretty --user=foobar WP get_installed_themes id=1
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"func" : "get_installed_themes",
"module" : "WP",
"result" : {
"warnings" : null,
"status" : 1,
"messages" : null,
"errors" : null,
"data" : {
"twentytwentyone" : {
"author" : "the WordPress team",
"author_uri" : "https://wordpress.org/",
"autoupdates" : 1,
"description" : "Twenty Twenty-One is a blank canvas for your ideas and it makes the block editor your best brush. With new block patterns, which allow you to create a beautiful layout in a matter of seconds, this theme’s soft colors and eye-catching — yet timeless — design will let your work shine. Take it for a spin! See how Twenty Twenty-One elevates your portfolio, business website, or personal blog.",
"icon_base64" : "...encoded-in-base-64...",
"icon_mime_type" : "image/png",
"license" : "GNU General Public License v2 or later",
"license_uri" : "http://www.gnu.org/licenses/gpl-2.0.html",
"minimum_php_version" : "5.6",
"minimum_wp_version" : "5.3",
"name" : "Twenty Twenty-One",
"screenshot_url" : "/wp-content/themes/twentytwentyone/screenshot.png",
"slug" : "twentytwentyone",
"status" : "inactive",
"tags" : "one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready",
"tested_version" : "6.2",
"text_domain" : "twentytwentyone",
"theme_uri" : "https://wordpress.org/themes/twentytwentyone/",
"update" : "none",
"version" : "1.8"
},
"twentytwentythree" : {
"author" : "the WordPress team",
"author_uri" : "https://wordpress.org",
"autoupdates" : 1,
"description" : "Twenty Twenty-Three is designed to take advantage of the new design tools introduced in WordPress 6.1. With a clean, blank base as a starting point, this default theme includes ten diverse style variations created by members of the WordPress community. Whether you want to build a complex or incredibly simple website, you can do it quickly and intuitively through the bundled styles or dive into creation and full customization yourself.",
"icon_base64" : "...encoded-in-base-64...",
"icon_mime_type" : "image/png",
"license" : "GNU General Public License v2 or later",
"license_uri" : "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
"minimum_php_version" : "5.6",
"minimum_wp_version" : "6.1",
"name" : "Twenty Twenty-Three",
"screenshot_url" : "/wp-content/themes/twentytwentythree/screenshot.png",
"slug" : "twentytwentythree",
"status" : "inactive",
"tags" : "one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, accessibility-ready, blog, portfolio, news",
"tested_version" : "6.2",
"text_domain" : "twentytwentythree",
"theme_uri" : "https://wordpress.org/themes/twentytwentythree",
"update" : "none",
"version" : "1.1"
},
},
"metadata" : {}
}
}
Search and List public WordPress Plugins.
ARGUMENTS
Optional. Maxiumum number of items to return. (Default 24)
Optional. The page number you are iteratiing on, (Default 1)
Optional. The search query string/
Optional. One of thr following: "new", "popular", "featured", "updated" ( default to popular )
Optional. Add the description to the reply. (default false)
EXAMPLES
* Fetching some plugins
uapi --user=cpuser --output=jsonpretty WP fetch_public_plugins per_page=2
The returned data will contain a structure similar to the JSON below:
{
"result" : {
"errors" : null,
"metadata" : {},
"messages" : null,
"data" : {
"plugins" : [
{
"slug" : "contact-form-7",
"requires" : "6.0",
"ratings" : {
"4" : 140,
"3" : 68,
"1" : 366,
"2" : 59,
"5" : 1377
},
"author_profile" : "https://profiles.wordpress.org/takayukister/",
"rating" : 80,
"support_threads_resolved" : 138,
"author" : "<a href=\"https://ideasilo.wordpress.com/\">Takayuki Miyoshi</a>",
"sections" : {
"installation" : "<ol>\n<li>Upload the entire <code>contact-form-7</code> folder to the <code>/wp-content/plugins/</code> directory.</li>\n<li>Activate the plugin through the <strong>Plugins</strong> screen (<strong>Plugins > Installed Plugins</strong>).</li>\n</ol>\n<p>You will find <strong>Contact</strong> menu in your WordPress admin screen.</p>\n<p>For basic usage, have a look at the <a href=\"https://contactform7.com/\" rel=\"nofollow ugc\">plugin’s website</a>.</p>\n",
"faq" : "<p>Do you have questions or issues with Contact Form 7? Use these support channels appropriately.</p>\n<ol>\n<li><a href=\"https://contactform7.com/docs/\" rel=\"nofollow ugc\">Docs</a></li>\n<li><a href=\"https://contactform7.com/faq/\" rel=\"nofollow ugc\">FAQ</a></li>\n<li><a href=\"https://wordpress.org/support/plugin/contact-form-7/\" rel=\"ugc\">Support forum</a></li>\n</ol>\n<p><a href=\"https://contactform7.com/support/\" rel=\"nofollow ugc\">Support</a></p>\n",
"screenshots" : "<ol><li><a href=\"https://ps.w.org/contact-form-7/assets/screenshot-1.png?rev=1176454\"><img src=\"https://ps.w.org/contact-form-7/assets/screenshot-1.png?rev=1176454\" alt=\"screenshot-1.png\"></a><p>screenshot-1.png</p></li></ol>",
"changelog" : "<p>For more information, see <a href=\"https://contactform7.com/category/releases/\" rel=\"nofollow ugc\">Releases</a>.</p>\n<h4>5.7.4</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-574/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-574/</a></p>\n<h4>5.7.3</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-573/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-573/</a></p>\n<h4>5.7.2</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-572/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-572/</a></p>\n<h4>5.7.1</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-571/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-571/</a></p>\n<h4>5.7</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-57/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-57/</a></p>\n<h4>5.6.4</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-564/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-564/</a></p>\n<h4>5.6.3</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-563/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-563/</a></p>\n<h4>5.6.2</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-562/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-562/</a></p>\n<h4>5.6.1</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-561/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-561/</a></p>\n<h4>5.6</h4>\n<p><a href=\"https://contactform7.com/contact-form-7-56/\" rel=\"nofollow ugc\">https://contactform7.com/contact-form-7-56/</a></p>\n",
"description" : "<p>Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.</p>\n<h4>Docs and support</h4>\n<p>You can find <a href=\"https://contactform7.com/docs/\" rel=\"nofollow ugc\">docs</a>, <a href=\"https://contactform7.com/faq/\" rel=\"nofollow ugc\">FAQ</a> and more detailed information about Contact Form 7 on <a href=\"https://contactform7.com/\" rel=\"nofollow ugc\">contactform7.com</a>. When you cannot find the answer to your question on the FAQ or in any of the documentation, check the <a href=\"https://wordpress.org/support/plugin/contact-form-7/\" rel=\"ugc\">support forum</a> on WordPress.org. If you cannot locate any topics that pertain to your particular issue, post a new topic for it.</p>\n<h4>Contact Form 7 needs your support</h4>\n<p>It is hard to continue development and support for this free plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider <a href=\"https://contactform7.com/donate/\" rel=\"nofollow ugc\">making a donation</a>. Your donation will help encourage and support the plugin’s continued development and better user support.</p>\n<h4>Privacy notices</h4>\n<p>With the default configuration, this plugin, in itself, does not:</p>\n<ul>\n<li>track users by stealth;</li>\n<li>write any user personal data to the database;</li>\n<li>send any data to external servers;</li>\n<li>use cookies.</li>\n</ul>\n<p>If you activate certain features in this plugin, the contact form submitter’s personal data, including their IP address, may be sent to the service provider. Thus, confirming the provider’s privacy policy is recommended. These features include:</p>\n<ul>\n<li>reCAPTCHA (<a href=\"https://policies.google.com/?hl=en\" rel=\"nofollow ugc\">Google</a>)</li>\n<li>Akismet (<a href=\"https://automattic.com/privacy/\" rel=\"nofollow ugc\">Automattic</a>)</li>\n<li>Constant Contact (<a href=\"https://www.endurance.com/privacy\" rel=\"nofollow ugc\">Endurance International Group</a>)</li>\n<li><a href=\"https://www.sendinblue.com/legal/privacypolicy/\" rel=\"nofollow ugc\">Sendinblue</a></li>\n<li><a href=\"https://stripe.com/privacy\" rel=\"nofollow ugc\">Stripe</a></li>\n</ul>\n<h4>Recommended plugins</h4>\n<p>The following plugins are recommended for Contact Form 7 users:</p>\n<ul>\n<li><a href=\"https://wordpress.org/plugins/flamingo/\" rel=\"ugc\">Flamingo</a> by Takayuki Miyoshi – With Flamingo, you can save submitted messages via contact forms in the database.</li>\n<li><a href=\"https://wordpress.org/plugins/bogo/\" rel=\"ugc\">Bogo</a> by Takayuki Miyoshi – Bogo is a straight-forward multilingual plugin that does not cause headaches.</li>\n</ul>\n<h4>Translations</h4>\n<p>You can <a href=\"https://contactform7.com/translating-contact-form-7/\" rel=\"nofollow ugc\">translate Contact Form 7</a> on <a href=\"https://translate.wordpress.org/projects/wp-plugins/contact-form-7\" rel=\"nofollow ugc\">translate.wordpress.org</a>.</p>\n"
},
"tested" : "6.1.1",
"added" : "2007-08-02",
"requires_php" : false,
"download_link" : "https://downloads.wordpress.org/plugin/contact-form-7.5.7.4.zip",
"version" : "5.7.4",
"compatibility" : [],
"screenshots" : {
"1" : {
"caption" : "screenshot-1.png",
"src" : "https://ps.w.org/contact-form-7/assets/screenshot-1.png?rev=1176454"
}
},
"short_description" : "Just another contact form plugin. Simple but flexible.",
"support_threads" : 467,
"name" : "Contact Form 7",
"downloaded" : 261590734,
"donate_link" : "https://contactform7.com/donate/",
"tags" : {
"email" : "email",
"contact" : "contact",
"form" : "form",
"contact-form" : "contact form",
"feedback" : "feedback"
},
"versions" : {
"3.7" : "https://downloads.wordpress.org/plugin/contact-form-7.3.7.zip",
"1.9.2.2" : "https://downloads.wordpress.org/plugin/contact-form-7.1.9.2.2.zip",
"5.3" : "https://downloads.wordpress.org/plugin/contact-form-7.5.3.zip",
"1.10.0.1" : "https://downloads.wordpress.org/plugin/contact-form-7.1.10.0.1.zip",
...
},
"last_updated" : "2023-02-19 4:38am GMT",
"num_ratings" : 2010
},
{
"added" : "2010-10-11",
"requires_php" : "5.6.20",
"download_link" : "https://downloads.wordpress.org/plugin/wordpress-seo.20.1.zip",
"version" : "20.1",
"sections" : {
"faq" : "\n<dt id='how%20do%20the%20xml%20sitemaps%20in%20the%20yoast%20seo%20plugin%20work%3F'>\nHow do the XML Sitemaps in the Yoast SEO plugin work?\n</h4>\n<p>\n<p>Having an XML sitemap can be beneficial for SEO, as Google can retrieve essential pages of a website very fast, even if the internal linking of a site isn’t flawless.<br />\nThe sitemap index and individual sitemaps are updated automatically as you add or remove content and will include the post types you want search engines to index. Post Types marked as noindex will not appear in the sitemap. <a href=\"https://yoa.st/3qt\" rel=\"nofollow ugc\">Learn more about XML Sitemaps</a>.</p>\n</p>\n<dt id='how%20can%20i%20add%20my%20website%20to%20google%20search%20console%3F'>\nHow can I add my website to Google Search Console?\n</h4>\n<p>\n<p>It is straightforward to add your website to Google Search Console.<br />\n1. Create a Google Search Console account and login into your account.<br />\n2. Click ‘Add a property’ under the search drop-down.<br />\n3. Enter your website URL in the box and click ‘Continue’.<br />\n4. Click the arrow next to ‘HTML tag’ to expand the option.<br />\n5. Copy the meta tag.<br />\n6. Log in to your WordPress website.<br />\n7. Click on ‘SEO’ in the dashboard.<br />\n8. Click on ‘General’.<br />\n9. Click on the ‘Webmaster Tools’ tab.<br />\n10. Paste the code in the Google field and click ‘Save Changes’.<br />\n11. Go back to Google Search Console and click ‘Verify’.</p>\n<p>If you want more details steps, please visit <a href=\"https://yoa.st/3qu\" rel=\"nofollow ugc\">our article on our help center</a>.</p>\n</p>\n<dt id='how%20do%20i%20implement%20yoast%20seo%20breadcrumbs%3F'>\nHow do I implement Yoast SEO breadcrumbs?\n</h4>\n<p>\n<p>The steps below are a temporary solution as manual edits made to theme files may be overwritten with future theme updates. Please contact the theme developer for a permanent solution. We’ve written an article about the <a href=\"https://yoa.st/3qv\" rel=\"nofollow ugc\">importance of breadcrumbs for SEO</a>.</p>\n<p>To implement the <a href=\"https://yoa.st/3qw\" rel=\"nofollow ugc\">breadcrumbs</a> function in Yoast SEO, you will have to edit your theme. We recommend that prior to any editing of the theme files, a backup is taken. Your host provider can help you take a backup.<br />\nCopy the following code into your theme where you want the breadcrumbs to be. If you are not sure, you will need to experiment with placement:</p>\n<pre><code><?php\nif ( function_exists( 'yoast_breadcrumb' ) ) {\n yoast_breadcrumb( '<p id=\"breadcrumbs\">','</p>' );\n}\n?>\n</code></pre>\n<p>Common places where you could place your breadcrumbs are inside your <code>single.php</code> and/or <code>page.php</code> file just above the page’s title. Another option that makes it really easy in some themes is by just pasting the code in <code>header.php</code> at the very end.</p>\n<p>In most non-WooTheme themes, this code snippet should not be added to your <code>functions.php</code> file.<br />\nAlternatively, you can manually add the breadcrumb shortcode to individual posts or pages: <code>[wpseo_breadcrumb]</code></p>\n<p>If you need more details or a step by step guide, read our <a href=\"https://yoa.st/3qx\" rel=\"nofollow ugc\">Implementation guide for Yoast SEO breadcrumbs</a>.</p>\n</p>\n<dt id='how%20do%20i%20noindex%20urls%3F'>\nHow do I noindex URLS?\n</h4>\n<p>\n<p>Yoast SEO provides multiple options for setting a URL or group of URLs to noindex. <a href=\"https://yoa.st/3qy/\" rel=\"nofollow ugc\">Read more about how to do this in this guide</a>.</p>\n</p>\n<dt id='google%20shows%20the%20wrong%20description%2C%20how%20do%20i%20fix%20this%3F'>\nGoogle shows the wrong description, how do I fix this?\n</h4>\n<p>\n<p>If you’ve crafted nice meta descriptions for your blog posts, nothing is more annoying than Google showing another description for your site completely in the search result snippet.</p>\n<p>Possible causes could be:<br />\n1. wrong description in code<br />\n2. Google cache is outdated<br />\n3. Search term manipulation<br />\n4. Google ignored the meta description</p>\n<p>You can <a href=\"https://yoa.st/3qz\" rel=\"nofollow ugc\">read more here on how to solve the issue with the wrong description</a>.</p>\n</p>\n<dt id='how%20often%20is%20yoast%20seo%20updated%3F'>\nHow often is Yoast SEO updated?\n</h4>\n<p>\n<p>Yoast SEO is updated every two weeks. If you want to know why, please read <a href=\"https://yoa.st/3q-\" rel=\"nofollow ugc\">this post on why we release every two weeks</a>!</p>\n</p>\n<dt id='how%20do%20i%20get%20support%3F'>\nHow do I get support?\n</h4>\n<p>\n<p>As our free plugin is used by millions of people worldwide, we cannot offer you all one on one support. If you have trouble with the Yoast SEO for WordPress plugin, you can get help on the support forums here at <a href=\"https://wordpress.org/support/plugin/wordpress-seo/\" rel=\"ugc\">wordpress.org</a> or by checking out our help center at <a href=\"https://yoa.st/3r1\" rel=\"nofollow ugc\">yoast.com/help/</a>.</p>\n<p>The plugins you buy at Yoast are called ‘premium plugins’ (even if Premium isn’t in its name) and include a complete year of free updates and premium support. This means you can contact our support team if you have any questions about that plugin.</p>\n<p><a href=\"https://yoa.st/3r2\" rel=\"nofollow ugc\">Read more on how to get support</a></p>\n</p>\n<dt id='what%20happens%20to%20my%20data%20if%20i%20enable%20usage%20tracking%3F'>\nWhat happens to my data if I enable usage tracking?\n</h4>\n<p>\n<p><a href=\"https://yoa.st/4w7\" rel=\"nofollow ugc\">This page on yoast.com explains what data we collect to improve Yoast SEO</a>. We only collect data when you explicitly opt in. Read more about how we handle your data in <a href=\"https://yoa.st/4w8\" rel=\"nofollow ugc\">our Privacy Policy</a>.</p>\n</p>\n<dt id='i%20have%20a%20different%20question%20than%20listed%20here'>\nI have a different question than listed here\n</h4>\n<p>\n<p>Your question has most likely been answered on our help center: <a href=\"https://yoa.st/1va\" rel=\"nofollow ugc\">yoast.com/help/</a>.</p>\n</p>\n\n",
"screenshots" : "<ol><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-1.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-1.png?rev=2853382\" alt=\"The modern interface makes Yoast SEO easy to work with.\"></a><p>The modern interface makes Yoast SEO easy to work with.</p></li><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-2.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-2.png?rev=2853382\" alt=\"Easily manage how your posts and pages appear in SERPs.\"></a><p>Easily manage how your posts and pages appear in SERPs.</p></li><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-3.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-3.png?rev=2853382\" alt=\"Yoast SEO Premium has extra crawl optimization options.\"></a><p>Yoast SEO Premium has extra crawl optimization options.</p></li><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-4.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-4.png?rev=2853382\" alt=\"Yoast SEO integrates with tools like Semrush and Wincher.\"></a><p>Yoast SEO integrates with tools like Semrush and Wincher.</p></li><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-5.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-5.png?rev=2853382\" alt=\"The famous SEO and readability analyses in Yoast SEO.\"></a><p>The famous SEO and readability analyses in Yoast SEO.</p></li><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-6.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-6.png?rev=2853382\" alt=\"See what your post looks like in Google.\"></a><p>See what your post looks like in Google.</p></li><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-7.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-7.png?rev=2853382\" alt=\"The First-time configuration helps you get started quickly.\"></a><p>The First-time configuration helps you get started quickly.</p></li><li><a href=\"https://ps.w.org/wordpress-seo/assets/screenshot-8.png?rev=2853382\"><img src=\"https://ps.w.org/wordpress-seo/assets/screenshot-8.png?rev=2853382\" alt=\"The inclusive language analysis in Yoast SEO.\"></a><p>The inclusive language analysis in Yoast SEO.</p></li></ol>",
"changelog" : "<h4>20.1</h4>\n<p>Release date: 2023-02-07</p>\n<p>Create a more inclusive online world with Yoast SEO 20.1. Our improved inclusive language analysis provides real-time feedback and offers suggestions to help your content reach a broader audience. For our Premium users, there’s a bonus – a new Mastodon integration to take your online presence to the next level. Get it now! Find out more about what’s new in Yoast SEO 20.1 in <a href=\"https://yoa.st/release-7-2-23\" rel=\"nofollow ugc\">our release post</a>!</p>\n<h4>Enhancements</h4>\n<ul>\n<li>Adds a link to the first time configuration in the plugin overview when this is not completed yet.</li>\n<li>Adds the site name to the Google preview for mobile.</li>\n<li>Improves the <em>inclusive language analysis</em> by expanding the number of non-inclusive phrases recognized as well as by improving the feedback, for example by adding more inclusive alternatives or fixing inconsistencies. Specifically, this includes the following changes:\n<ul>\n<li>Adds word form support (singular vs. plural, different verb forms) for some non-inclusive phrases.</li>\n<li>Improves the feedback strings and suggested alternatives for phrases containing the terms “crazy” and “OCD”.</li>\n<li>Improves the feedback strings pertaining to medical conditions.</li>\n<li>Improves the feedback strings for “binge”, “preferred pronouns”, and “preferred name”.</li>\n<li>Changes the scoring and improves the feedback string for “ladies and gentleman”.</li>\n<li>Changes the feedback in the publish box from “OK” to “Potentially non-inclusive”.</li>\n<li>Excludes the phrases “binge drinking/drinks/drink” and “exotic shorthairs/longhairs” from being targeted as non-inclusive.</li>\n</ul>\n</li>\n</ul>\n<h4>Bugfixes</h4>\n<ul>\n<li>Fixes a bug where the <em>Format archives</em> settings would not work correctly when the <code>post_format</code> taxonomy is disabled.</li>\n<li>Fixes a bug where the <em>Media pages</em> settings would not work correctly when the <code>attachment</code> post type is filtered out via <code>wpseo_indexable_excluded_post_types</code>.</li>\n<li>Fixes a bug where the highlighting feature in the Classic editor would not work when inline HTML tags were present.</li>\n<li>Fixes a bug where the settings’ introduction modal would not be visible on wider screens with less than ~700 pixels height.</li>\n<li>Fixes a bug where <code>wpseo_opengraph_image_size</code> is used to set custom size to <code>og:image</code> but doesn’t work when uploading an image with the same size as the custom size.</li>\n</ul>\n<h4>Other</h4>\n<ul>\n<li>Improves the translations comments in <em>Settings > Site connections</em> and a translatable string used by screen readers.</li>\n</ul>\n<h4>20.0</h4>\n<p>Release date: 2023-01-24</p>\n<p>We’re proud to introduce a brand new settings interface in Yoast SEO 20.0. We’ve worked hard to make this interface both beautiful and helpful. It’s now much easier and enjoyable to work on your SEO. Plus, it’s the start of much more cool stuff to come! Find out more about what’s new in Yoast SEO 20.0 in <a href=\"https://yoa.st/release-24-1-23\" rel=\"nofollow ugc\">our release post</a>!</p>\n<h4>Enhancements</h4>\n<ul>\n<li>NEW: Introduces a brand-new design for Yoast SEO’s settings pages:\n<ul>\n<li>Completely overhauled the old ‘settings’ admin pages with a sleek and modern interface.</li>\n<li>Combines, moves and improves various admin pages.</li>\n<li>Adds the ability to search through site settings to quickly discover and modify your desired setting.</li>\n<li>Adds extra information and help for all controls.</li>\n<li>Vastly improves accessibility (including better support for keyboard navigation).</li>\n<li>Key features are now listed on the ‘Site features’ page under ‘General’.</li>\n<li>Webmaster Tools settings have moved to ‘Site connections’ page under ‘General’.</li>\n<li>Open Graph settings can now be found in ‘Site features’ under ‘General’.</li>\n<li>Adds an introduction modal with videos to quickly help you on your way.</li>\n</ul>\n</li>\n<li>Improves the link focus styles in the first time configuration.</li>\n</ul>\n<h4>Other</h4>\n<ul>\n<li>Displays a notification urging to upgrade Premium if the version is below 20.0, since some settings might be missing from the new user interface.</li>\n</ul>\n<h4>Earlier versions</h4>\n<p>For the changelog of earlier versions, please refer to <a href=\"https://yoa.st/yoast-seo-changelog\" rel=\"nofollow ugc\">the changelog on yoast.com</a>.</p>\n",
"description" : "<h3>Yoast SEO: the #1 WordPress SEO plugin</h3>\n<p>Since 2008 Yoast SEO has helped millions of websites worldwide to <strong>rank higher in search engines</strong>.</p>\n<p>Yoast’s mission is <strong>SEO for Everyone</strong>. Our plugin’s users range from the bakery around the corner to some of the most popular sites on the planet.</p>\n<p>Yoast SEO Free contains everything that you need to manage your SEO, and the <a href=\"https://yoa.st/1v8\" rel=\"nofollow ugc\">Yoast SEO Premium</a> plugin and its extensions unlock even more tools and functionality.</p>\n<h4>GET AHEAD OF THE COMPETITION</h4>\n<p>To rank highly in search engines, you need to beat the competition. You need a better, faster, stronger website than the people who sell or do the same kinds of things as you.</p>\n<p>Yoast SEO is the most-used WordPress SEO plugin, and has helped millions of people like you to get ahead, and to stay ahead.</p>\n<h4>TAKING CARE OF YOUR WORDPRESS SEO</h4>\n<p>Yoast SEO is packed full of features, designed to help visitors and search engines to get the most out of your website. Some of our favourites are:</p>\n<ul>\n<li>Automated technical SEO improvements, like <strong>canonical URLs</strong> and <strong>meta tags</strong>.</li>\n<li>Advanced <strong>XML sitemaps</strong>; making it easy for Google to understand your site structure.</li>\n<li>Title and meta description templating, for <strong>better branding</strong> and consistent snippets in the search results.</li>\n<li>An in-depth Schema.org integration that will <strong>increase your chance of getting rich results</strong>, by helping search engines to understand your content.</li>\n<li>Full control over <strong>site breadcrumbs</strong>, so that users and search engines always know where they are.</li>\n<li><strong>Faster loading times</strong> for your whole website, due to an innovative way of managing data in WordPress.</li>\n<li><strong>[Premium]</strong> E-mail support for our <a href=\"https://yoa.st/1v8\" rel=\"nofollow ugc\">Yoast SEO Premium</a> users.</li>\n<li><strong>[Premium]</strong> The possibility to expand Yoast SEO with the <a href=\"https://yoa.st/1uv\" rel=\"nofollow ugc\">News SEO</a>, <a href=\"https://yoa.st/1uw\" rel=\"nofollow ugc\">Video SEO</a>, <a href=\"https://yoa.st/1uu\" rel=\"nofollow ugc\">Local SEO</a> and <a href=\"https://yoa.st/3rh\" rel=\"nofollow ugc\">WooCommerce SEO</a> extensions.</li>\n<li><strong>[Premium]</strong> <strong>New!</strong> Yoast SEO Premium comes with wide-ranging crawl settings that help you improve how search engines crawl your site.</li>\n<li><strong>[Premium]</strong> <strong>New!</strong> Yoast SEO Premium comes with an IndexNow integration to ping search engines like Microsoft Bing whenever you publish or update content.</li>\n</ul>\n<h4>WRITE KILLER CONTENT WITH YOAST SEO</h4>\n<p>We know content is king, that’s why Yoast SEO is famous for its <strong>state-of-the-art content and SEO analysis</strong>. Yoast SEO gives you:</p>\n<ul>\n<li><strong>SEO analysis</strong>: an invaluable tool while writing SEO-friendly content with the right (focus) keyphrases in mind.</li>\n<li><strong>Readability analysis</strong>: ensures that humans and search engines can read and understand your content.</li>\n<li><strong>Full language support</strong> for: English, German, French, Dutch, Spanish, Italian, Russian, Indonesian, Polish, Portuguese, Arabic, Swedish, Hebrew, Hungarian, Turkish, Czech, Norwegian, Slovak and Greek.</li>\n<li><strong>A Google preview</strong>, which shows what your listings will look like in the search results. Even on mobile devices!</li>\n<li><strong>Innovative Schema blocks</strong> for the WordPress block editor, so that your FAQ and HowTo content can be shown directly in the search results. Plus a breadcrumbs block to guide your users.</li>\n<li><strong>[Premium] Internal linking blocks</strong> to easily improve the structure of your content. Easily add a <strong>table of contents block</strong>, a <strong>related links block</strong>, a <strong>subpages</strong> block, or <strong>siblings block</strong>! Plus, we’ll keep adding these easy-to-add blocks to improve your site structure.</li>\n<li><strong>[Premium]</strong> Social previews to show you how your content will be shown on Twitter and Facebook. Plus: Social Appearance Templates to guarantee a consistent look.</li>\n<li><strong>[Premium]</strong> The Insights tool that shows you what your text focuses on. This way you can keep your article in line with your keyphrases.</li>\n<li><strong>[Premium]</strong> Optimize your content for synonyms and related keyphrases.</li>\n<li><strong>[Premium]</strong> Optimize your article for different word forms of your keyphrases, as the singular and plural. But also different verb forms, synonyms, and related keyphrases. This makes for more natural content!</li>\n<li><strong>[Premium]</strong> Automatic internal linking suggestions: write your article and get automatic suggested posts to link to!</li>\n<li><strong>[Premium]</strong> An orphaned content filter to detect posts that have no links pointing towards them!</li>\n<li><strong>[Premium]</strong> SEO workouts to make working on your site as easy as ABC. These SEO workflows will get your site into shape in no time!</li>\n<li><strong>[Premium]</strong> <strong>New!</strong> Yoast SEO Premium comes with a new word complexity feature that gives you actionable feedback on using difficult words. This feature is in beta and English only for now.</li>\n<li><strong>New!</strong> Yoast SEO Free and Premium come with a new inclusive language analysis that helps you write inclusive content. This feature is opt-in and English-only for now.</li>\n</ul>\n<h4>KEEP YOUR SITE IN PERFECT SHAPE</h4>\n<p>Whether you are an online entrepreneur, blogger or content creator, a developer, a (WordPress) SEO expert or a business owner, Yoast SEO helps you keep your website in perfect shape by:</p>\n<ul>\n<li>Tuning the engine of your website, so you can work on creating great content!</li>\n<li>Giving you <strong>cornerstone content</strong> and <strong>internal linking</strong> features to help you optimize your site structure in a breeze.</li>\n<li>Translating your content to <strong>structured data</strong> where possible, to help search engines understand your website.</li>\n<li>Helping you manage your team: with our <strong>SEO roles</strong> you can give colleagues access to specific sections of the Yoast SEO plugin.</li>\n<li><strong>[Premium] Automatically creating redirects</strong> when URLs change or when pages are deleted, and providing tools to manage or create redirects.</li>\n<li><strong>[Premium]</strong> Showing you <strong>social previews</strong> to manage the way your page is shared on social networks like Facebook and Twitter.</li>\n</ul>\n<h4>TRUST THE EXPERTS</h4>\n<p>Yoast is powered by a team of expert developers, testers, software architects, and SEO consultants. They work constantly to stay at the cutting edge of WordPress SEO, and to improve the plugin with every release.</p>\n<p>Yoast SEO is the <strong>only WordPress SEO plugin made by world-renowned SEO experts</strong>.</p>\n<h3>GET PREMIUM SUPPORT</h3>\n<p>The Yoast team offers regular support on the WordPress.org forums. But we hope you understand that we prioritize our Premium customers. This one-on-one email support is available to people who have purchased Yoast SEO Premium.</p>\n<p>Did you know that <a href=\"https://yoa.st/1v8\" rel=\"nofollow ugc\">Yoast SEO Premium</a> contains a lot of extra features:</p>\n<ul>\n<li>A <strong>redirect manager</strong> that prevents “404: page not found” errors</li>\n<li>Optimize without worrying about over-optimization with <strong>intelligent word form recognition</strong> available in multiple languages.</li>\n<li><strong>Internal linking blocks</strong> to structure your site easily.</li>\n<li><strong>Internal linking suggestions</strong> while you’re writing.</li>\n<li>Preview your content to see what it will look like in the search results and when shared on social media using the <strong>Google preview</strong> and <strong>social preview</strong>.</li>\n<li><strong>Cornerstone content checks</strong> that point search engines to your most important pages.</li>\n<li>Connect Yoast SEO to Zapier to easily <strong>create zaps that instantly share your published posts</strong> with 2000+ destinations like Twitter, Facebook, and much more.</li>\n</ul>\n<p>If you are serious about your WordPress SEO, install the <a href=\"https://yoa.st/1v8\" rel=\"nofollow ugc\">Yoast SEO Premium plugin</a>! <strong>Costs a little, saves a lot of time!</strong></p>\n<h4>OUR EXTENSIONS TO FURTHER IMPROVE YOUR WORDPRESS SEO</h4>\n<p>Check out these SEO add-ons by Yoast:</p>\n<ul>\n<li><strong><a href=\"https://yoa.st/1uu\" rel=\"nofollow ugc\">Yoast Local SEO</a></strong> optimizes your website for a local audience.</li>\n<li><strong><a href=\"https://yoa.st/1uw\" rel=\"nofollow ugc\">Yoast Video SEO</a></strong> ensures that Google understands what your video is about, increasing the chances of ranking in the video results.</li>\n<li><strong><a href=\"https://yoa.st/1uv\" rel=\"nofollow ugc\">Yoast News SEO</a></strong> for news websites that want to improve their visibility and performance in Google News.</li>\n<li><strong><a href=\"https://yoa.st/3rh\" rel=\"nofollow ugc\">WooCommerce SEO</a></strong> for all online shops that want to perform better in the search results and social media.</li>\n</ul>\n<p>These extensions work fine with the free version of Yoast SEO. Of course, the premium extensions also include 24/7 support.</p>\n<p>Oh, don’t forget: our <strong><a href=\"https://yoa.st/3ri\" rel=\"nofollow ugc\">Yoast Academy</a></strong> is for all entrepreneurs, bloggers, and anyone who wants to learn more about optimizing websites, improving your WordPress SEO, and if you want to take your content to the next level!</p>\n<h3>INTEGRATIONS</h3>\n<p>Yoast SEO integrates seamlessly into a range of themes and plugins. We work particularly well with:</p>\n<ul>\n<li>The <a href=\"https://wordpress.org/support/article/wordpress-editor/\" rel=\"ugc\">WordPress block editor</a> (or ‘Gutenberg’ editor).</li>\n<li>The official <a href=\"https://wordpress.org/plugins/amp/\" rel=\"ugc\">AMP</a> plugin, which changes your templates to use the ‘AMP’ HTML format.</li>\n<li>Google’s <a href=\"https://wordpress.org/plugins/web-stories/\" rel=\"ugc\">Web Stories</a> plugin, which helps you to create ‘<a href=\"https://amp.dev/about/stories/\" rel=\"nofollow ugc\">web stories</a>’.</li>\n<li>The <a href=\"https://wordpress.org/plugins/advanced-custom-fields/\" rel=\"ugc\">Advanced Custom Fields</a> plugin, when you also activate the <a href=\"https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/\" rel=\"ugc\">ACF Content Analysis for Yoast SEO</a> plugin.</li>\n<li>The <a href=\"https://wordpress.org/plugins/elementor/\" rel=\"ugc\">Elementor</a> website builder.</li>\n<li><a href=\"https://zapier.com/apps/yoast-seo/integrations\" rel=\"nofollow ugc\">Zapier</a>, which helps you automate your publishing flow.</li>\n<li><a href=\"https://wordpress.org/plugins/wp-search-with-algolia/\" rel=\"ugc\">Algolia</a> integration to improve the quality of your site search.</li>\n<li><a href=\"https://wordproof.com/\" rel=\"nofollow ugc\">WordProof</a>, which helps you prove ownership by adding timestamps.</li>\n</ul>\n<h3>BUG REPORTS</h3>\n<p>Do you want to report a bug for Yoast SEO? Best to do so in the WordPress SEO <a href=\"https://github.com/Yoast/wordpress-seo\" rel=\"nofollow ugc\">repository on GitHub</a>. Please note that GitHub is not a support forum and issues will be closed if they don’t meet the bug requirements.</p>\n<h3>READ MORE</h3>\n<p>Want more information on search engine optimization and Yoast SEO? Have a look at:</p>\n<ul>\n<li>The <a href=\"https://yoa.st/1v8\" rel=\"nofollow ugc\">Yoast SEO Plugin</a> official homepage.</li>\n<li>The <a href=\"https://yoa.st/1va\" rel=\"nofollow ugc\">Yoast SEO Help center</a>.</li>\n<li><a href=\"https://yoa.st/1v6\" rel=\"nofollow ugc\">WordPress SEO – The definitive Guide by Yoast</a>.</li>\n<li>Other <a href=\"https://yoa.st/1v9\" rel=\"nofollow ugc\">WordPress Plugins</a> by Team Yoast.</li>\n<li>Also follow Yoast on <a href=\"https://facebook.com/yoast\" rel=\"nofollow ugc\">Facebook</a>, <a href=\"https://www.instagram.com/yoast/\" rel=\"nofollow ugc\">Instagram</a> & <a href=\"https://twitter.com/yoast\" rel=\"nofollow ugc\">Twitter</a>.</li>\n</ul>\n",
"installation" : "<p>Starting with Yoast SEO consists of just two steps: installing and setting up the plugin. Yoast SEO is designed to work with your site’s specific needs, so don’t forget to go through the Yoast SEO first-time configuration as explained in the ‘after activation’ step!</p>\n<h3>INSTALL YOAST SEO FROM WITHIN WORDPRESS</h3>\n<ol>\n<li>Visit the plugins page within your dashboard and select ‘Add New’;</li>\n<li>Search for ‘Yoast SEO’;</li>\n<li>Activate Yoast SEO from your Plugins page;</li>\n<li>Go to ‘after activation’ below.</li>\n</ol>\n<h3>INSTALL YOAST SEO MANUALLY</h3>\n<ol>\n<li>Upload the ‘wordpress-seo’ folder to the /wp-content/plugins/ directory;</li>\n<li>Activate the Yoast SEO plugin through the ‘Plugins’ menu in WordPress;</li>\n<li>Go to ‘after activation’ below.</li>\n</ol>\n<h3>AFTER ACTIVATION</h3>\n<ol>\n<li>You should see (a notice to start) the Yoast SEO first-time configuration;</li>\n<li>Go through this configuration and set up the plugin for your site;</li>\n<li>You’re done!</li>\n</ol>\n"
},
"tested" : "6.1.1",
"author" : "<a href=\"https://yoa.st/1uk\">Team Yoast</a>",
"slug" : "wordpress-seo",
"author_profile" : "https://profiles.wordpress.org/yoast/",
"requires" : "6.0",
"ratings" : {
"3" : 187,
"4" : 620,
"1" : 774,
"2" : 129,
"5" : 25836
},
"support_threads_resolved" : 378,
"rating" : 96,
"versions" : {
"19.9" : "https://downloads.wordpress.org/plugin/wordpress-seo.19.9.zip",
"19.4" : "https://downloads.wordpress.org/plugin/wordpress-seo.19.4.zip",
"19.2" : "https://downloads.wordpress.org/plugin/wordpress-seo.19.2.zip",
...
},
"last_updated" : "2023-02-07 8:35am GMT",
"num_ratings" : 27546,
"downloaded" : 514562694,
"name" : "Yoast SEO",
"support_threads" : 411,
"donate_link" : "https://yoa.st/1up",
"tags" : {
"content-analysis" : "Content analysis",
"readability" : "Readability",
"xml-sitemap" : "xml sitemap",
"schema" : "schema",
"seo" : "seo"
},
"short_description" : "Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO plugin.",
"compatibility" : [],
"screenshots" : {
"6" : {
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-6.png?rev=2853382",
"caption" : "See what your post looks like in Google."
},
"5" : {
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-5.png?rev=2853382",
"caption" : "The famous SEO and readability analyses in Yoast SEO."
},
"2" : {
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-2.png?rev=2853382",
"caption" : "Easily manage how your posts and pages appear in SERPs."
},
"1" : {
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-1.png?rev=2853382",
"caption" : "The modern interface makes Yoast SEO easy to work with."
},
"8" : {
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-8.png?rev=2853382",
"caption" : "The inclusive language analysis in Yoast SEO."
},
"3" : {
"caption" : "Yoast SEO Premium has extra crawl optimization options.",
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-3.png?rev=2853382"
},
"7" : {
"caption" : "The First-time configuration helps you get started quickly.",
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-7.png?rev=2853382"
},
"4" : {
"src" : "https://ps.w.org/wordpress-seo/assets/screenshot-4.png?rev=2853382",
"caption" : "Yoast SEO integrates with tools like Semrush and Wincher."
}
}
}
],
"info" : {
"pages" : 27728,
"results" : 55456,
"page" : 1
},
"cli_status" : 1
},
"warnings" : null,
"status" : 1
},
"func" : "fetch_public_plugins",
"apiversion" : 3,
"module" : "WP"
}
Set a single plugin auto-update setting to on/off
ARGUMENTS
Required. Provide the instance_id
Required. The plugin slug.
Required. Enable or disable the auto-update setting.
Valid values are: 1/0
EXAMPLES
* getting plugin updates.
Then run the uapi call:
uapi --output=jsonpretty --user=foobar WP set_plugin_auto_update id=1 plugin=buddypress enabled=1
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "set_plugin_auto_update",
"apiversion" : 3,
"result" : {
"errors" : null,
"metadata" : {},
"messages" : null,
"warnings" : null,
"data" : "Theme twentytwentytwo autoupdate settings set to true.",
"status" : 1
},
}
This is an alias for update_plugins
Update one or more plugins from wordpress.com
ARGUMENTS
Required. Provide the instance_id
Required. The plugin slug.
EXAMPLES
* Updating a single plugin id.
uapi --output=jsonpretty --user=foobar WP update_plugin id=ID plugin=buddypress
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"func" : "update_plugin",
"apiversion" : 3
"result" : {
"status" : 1,
"errors" : null,
"data" : "Plugin buddypress has been updated:\nEnabling Maintenance mode...\nDownloading update from https://downloads.wordpress.org/plugin/buddypress.11.0.0.zip...\nUsing cached file '/home/foobar/.wp-cli/cache/plugin/buddypress-11.0.0.zip'...\nUnpacking the update...\nInstalling the latest version...\nRemoving the old version of the plugin...\nPlugin updated successfully.\nDisabling Maintenance mode...\nSuccess: Updated 1 of 1 plugins.\nname\told_version\tnew_version\tstatus\nbuddypress\t10.6.0\t11.0.0\tUpdated\n",
"messages" : null,
"warnings" : null,
"metadata" : {}
},
}
* Updating multiple plugins
uapi --output=jsonpretty --user=foobar WP update_plugins id=ID plugin=hello plugin=wordpress-seo
{
"apiversion" : 3,
"func" : "update_plugin",
"module" : "WP",
"result" : {
"data" : "Plugins ”hello”, ”wordpress-seo” have been updated:\nSuccess: Plugins already updated.\n",
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
}
}
This is an alias for activate_plugins.
Activate one or more plugins already installed for WPTK instance.
ARGUMENTS
Required. Provide the instance_id
Required. The plugin slug.
EXAMPLES
* Activate a single plugin
uapi --user=user --output=jsonpretty WP activate_plugin id=ID plugin=hello
{
"apiversion" : 3,
"func" : "activate_plugin",
"result" : {
"warnings" : null,
"metadata" : {},
"messages" : null,
"status" : 1,
"errors" : null,
"data" : "Plugin ”hello” has been activated:\nPlugin 'hello' activated.\nSuccess: Activated 1 of 1 plugins.\n"
},
"module" : "WP"
}
* Activate multiple plugins
Then run the uapi call:
uapi --user=user --output=jsonpretty WP activate_plugins id=ID plugin=hello plugin=contact-form-7
{
"apiversion" : 3,
"func" : "activate_plugins",
"module" : "WP",
"result" : {
"data" : "Plugins ”contact-form-7”, ”hello” have been activated:\nSuccess: Plugins already activated.\nWarning: Plugin 'hello' is already active.\nWarning: Plugin 'contact-form-7' is already active.\n",
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
},
}
This is an alias for deactivate_plugins.
Deactivate one or more plugins already installed for WPTK instance.
ARGUMENTS
Required. Provide the instance_id
Required. The plugin slug.
EXAMPLES
* Deactivate a single plugin
Then run the uapi call:
uapi --user=cpsuer --output=jsonpretty WP deactivate_plugin id=ID plugin=hello
{
"result" : {
"status" : 1,
"messages" : null,
"errors" : null,
"metadata" : {},
"data" : "Plugin ”hello” has been deactivated:\nPlugin 'hello' deactivated.\nSuccess: Deactivated 1 of 1 plugins.\n",
"warnings" : null
},
"func" : "deactivate_plugin",
"apiversion" : 3,
"module" : "WP"
}
* Deactivate multiple plugins
uapi --user=cpuser --output=jsonpretty WP deactivate_plugins id=ID plugin=hello plugin=contact-form-7
{
"apiversion" : 3,
"func" : "deactivate_plugins",
"module" : "WP",
"result" : {
"data" : "Plugins ”contact-form-7”, ”hello” have been deactivated:\nPlugin 'contact-form-7' deactivated.\nSuccess: Deactivated 1 of 2 plugins.\nWarning: Plugin 'hello' isn't active.\n",
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
}
}
Alias to delete_plugins
Delete one or more plugins from a WPTK instance.
ARGUMENTS
Required. Provide the instance_id
Required. The plugin slug.
EXAMPLES
* deleting a single plugin
uapi --user=user --output=jsonpretty WP delete_plugin id=ID plugin=hello
{
"apiversion" : 3,
"result" : {
"errors" : null,
"metadata" : {},
"messages" : null,
"warnings" : null,
"status" : 1,
"data" : "Plugin ”hello” has been deleted:\nDeleted 'hello' plugin.\nSuccess: Deleted 1 of 1 plugins.\n"
},
"module" : "WP",
"func" : "delete_plugin"
}
* deleting multiple plugins
uapi --user=user --output=jsonpretty WP delete_plugins id=ID plugin=hello plugin=contact-form-7
{
"apiversion" : 3,
"func" : "delete_plugins",
"module" : "WP",
"result" : {
"data" : "Plugins ”contact-form-7”, ”hello” have been deleted:\nDeleted 'hello' plugin.\nDeleted 'contact-form-7' plugin.\nSuccess: Deleted 2 of 2 plugins.\n",
"errors" : null,
"messages" : null,
"metadata" : {},
"status" : 1,
"warnings" : null
}
}
Install a plugin to a WPTK instance
ARGUMENTS
Required. Provide the instance_id
Required. The plugin slug.
Optional. Indicate the plugin status installation. Default to false (deactivated).
EXAMPLES
* install a plugin
Then run the uapi call:
uapi --user=user --output=jsonpretty WP install_plugin id=ID plugin=hello
{
"apiversion" : 3,
"module" : "WP",
"func" : "install_plugin",
"result" : {
"messages" : null,
"errors" : null,
"warnings" : null,
"data" : "Plugin ”hello” has been installed:\nSuccess: Plugin already deleted.\nWarning: The 'hello' plugin could not be found.\n",
"metadata" : {},
"status" : 1
}
}
List all installed plugins for an instance id.
ARGUMENTS
Required. Provide the instance_id
EXAMPLES
* Listing plugins installed for an instance
Then run the uapi call:
uapi --user=user --output=jsonpretty WP get_installed_plugins id=ID
{
"func" : "get_installed_plugins",
"result" : {
"status" : 1,
"errors" : null,
"messages" : null,
"data" : {
"google-site-kit" : {
"update" : "available",
"version" : "1.93.0",
"status" : "active"
},
"wp-super-cache" : {
"status" : "active",
"version" : "1.9.3",
"update" : "none"
},
"wordpress-seo" : {
"status" : "active",
"version" : "20.0",
"update" : "available"
},
"limit-login-attempts-reloaded" : {
"update" : "available",
"version" : "2.25.11",
"status" : "active"
},
"contact-form-7" : {
"status" : "active",
"version" : "5.7.3",
"update" : "none"
},
"akismet" : {
"version" : "5.0.1",
"status" : "inactive",
"update" : "available"
},
"advanced-cache.php" : {
"status" : "dropin",
"update" : "none"
}
},
"warnings" : null,
"metadata" : {}
},
"module" : "WP",
"apiversion" : 3
}
Check the status for several WP Toolkit features. This API can be used for the Expanded view screen to display the tools status.
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLES
* Update theme for an instance
uapi --user=cpuser --output=jsonpretty WP get_features_status instance_id=50
The returned data will contain a structure similar to the JSON below:
{
"result" : {
"warnings" : null,
"status" : 1,
"errors" : null,
"data" : {
"features" : {
"debug" : {
"status" : false
},
"wpCronTakeover" : {
"status" : false,
"taskReplacementStatus" : true,
"available" : true
},
"indexing" : {
"status" : true
},
"passwordProtection" : {
"available" : true,
"status" : false
},
"hotlinkProtection" : {
"status" : false,
"available" : true
},
"smartUpdate" : {
"promoAvailable" : false,
"initiatedByAutoUpdater" : false,
"taskStatus" : "notExist",
"status" : false,
"applicable" : true,
"available" : true
}
},
"id" : 41
},
"metadata" : {},
"messages" : null
},
"apiversion" : 3,
"module" : "WP",
"func" : "get_features_status"
}
Update the status of a WP Toolkit feature. This API can be used for the Expanded view screen to display the tools status.
ARGUMENTS
Required. The wp toolkit instance id.
Required. The name of the feature.
Current supported names are: indexing, debug, passwordProtection, wpCronTakeover, hotlinkProtection.
Required. True when the staus needs to be enabled. False to disable the feature.
Optional: only used when enabling 'passwordProtection' feature
Optional: only used when enabling 'passwordProtection' feature
EXAMPLES
* Toggle the 'Search Engine Indexing' feature
uapi --user=xpress --output=jsonpretty WP update_feature id=41 name=indexing status=true
{
"module" : "WP",
"apiversion" : 3,
"func" : "update_feature",
"result" : {
"warnings" : null,
"metadata" : {},
"status" : 1,
"data" : {
"status" : true
},
"messages" : null,
"errors" : null
}
}
* Toggle the 'debug' feature
uapi --user=xpress --output=jsonpretty WP update_feature id=41 name=debug status=true
{
"func" : "update_feature",
"result" : {
"warnings" : null,
"data" : {
"status" : true
},
"errors" : null,
"metadata" : {},
"messages" : null,
"status" : 1
},
"module" : "WP",
"apiversion" : 3
}
* Enable the password Protection
You also need to provide a username and password when enabling that feature.
uapi --user=xpress --output=jsonpretty WP update_feature id=41 name=passwordProtection status=true username=USERNAME password=******
{
"result" : {
"metadata" : {},
"status" : 1,
"messages" : null,
"warnings" : null,
"data" : {
"credentials" : {
"password" : "******",
"username" : "USERNAME"
},
"available" : true,
"status" : true
},
"errors" : null
},
"apiversion" : 3,
"module" : "WP",
}
* Disable the password Protection
uapi --user=xpress --output=jsonpretty WP update_feature id=41 name=passwordProtection status=false
{
"func" : "update_feature",
"apiversion" : 3,
"result" : {
"warnings" : null,
"data" : {
"available" : true,
"credentials" : null,
"status" : false
},
"metadata" : {},
"messages" : null,
"errors" : null,
"status" : 1
},
"module" : "WP"
}
* Disable the 'Take over wp-cron.php' feature
uapi --user=xpress --output=jsonpretty WP update_feature id=41 name=wpCronTakeover status=false
{
"apiversion" : 3,
"func" : "update_feature",
"module" : "WP",
"result" : {
"messages" : null,
"status" : 1,
"data" : {
"status" : false,
"taskReplacementStatus" : true,
"available" : true
},
"warnings" : null,
"metadata" : {},
"errors" : null
}
}
* Disable the 'hotlink protection' feature
uapi --user=xpress --output=jsonpretty WP update_feature id=41 name=hotlinkProtection status=false
{
"func" : "update_feature",
"module" : "WP",
"result" : {
"metadata" : {},
"errors" : null,
"status" : 1,
"warnings" : null,
"data" : {
"status" : false
},
"messages" : null
},
"apiversion" : 3
}
Retrieves all WP Toolkit autoupdate settings in one structure.
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLE
uapi --user=cpuser --output=jsonpretty WP get_wptk_autodupdate_settings id=1
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"result" : {
"data" : {
"core" : "disabled",
"available" : true,
"plugins" : {
"forceUpdates" : true,
"updateVulnerable" : false,
"deactivateVulnerable" : false,
"newlyInstalledUpdates" : false
},
"themes" : {
"updateVulnerable" : false,
"forceUpdates" : true,
"newlyInstalledUpdates" : false
}
},
"status" : 1,
"errors" : null,
"warnings" : null,
"messages" : null,
"metadata" : {}
},
"func" : "get_wptk_autodupdate_settings",
"apiversion" : 3
}
Changes all values located in the get_wptk_autodupdate_settings structure.
ARGUMENTS
Required. The wp toolkit instance id.
Optional boolean
Optional boolean
Optional boolean
Optional boolean
Optional boolean
Optional boolean
Optional boolean
Optional boolean
NOTE: Not all settings will be possible. As an example, you cannot set 'deactivateVulnerable' if you have not first/also set 'forceUpdates'
EXAMPLE
uapi --user=cpuser --output=jsonpretty WP set_wptk_autodupdate_settings id=1 plugins.forceUpdates=1 plugins.deactivateVulnerable=1 core=disabled themes.forceUpdates=1
The returned data will contain a structure similar to the JSON below which will confirm what was set.
{
"func" : "set_wptk_autodupdate_settings",
"result" : {
"status" : 1,
"errors" : null,
"warnings" : null,
"metadata" : {},
"data" : {
"themes" : {
"updateVulnerable" : false,
"forceUpdates" : true,
"newlyInstalledUpdates" : false
},
"plugins" : {
"forceUpdates" : true,
"updateVulnerable" : false,
"deactivateVulnerable" : false,
"newlyInstalledUpdates" : false
},
"available" : true,
"core" : "disabled"
},
"messages" : null
},
"apiversion" : 3,
"module" : "WP"
}
Executes a wordpress upgrade via wptk.
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLES
* Update theme for an instance
uapi --user=cpuser --output=jsonpretty WP get_admin_user_pass instance_id=50
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"module" : "WP",
"result" : {
"data" : {
"user_pass" : "password_will_be_here",
"user_login" : "foobar",
"roles" : "administrator"
},
"status" : 1,
"warnings" : null,
"errors" : null,
"metadata" : {},
"messages" : null
},
"func" : "get_admin_user_pass"
}
Provides the primary user/password, primarily to auto-log them in.
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLES
* Update theme for an instance
uapi --user=cpuser --output=jsonpretty WP get_admin_user_pass instance_id=50
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"module" : "WP",
"result" : {
"data" : {
"user_pass" : "password_will_be_here",
"user_login" : "foobar",
"roles" : "administrator"
},
"status" : 1,
"warnings" : null,
"errors" : null,
"metadata" : {},
"messages" : null
},
"func" : "get_admin_user_pass"
}
Returns the database settings for some common values.
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLES
* Update theme for an instance
uapi --user=cpuser --output=jsonpretty WP get_db_settings instance_id=ID
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"apiversion" : 3,
"result" : {
"status" : 1,
"messages" : null,
"metadata" : {},
"errors" : null,
"warnings" : null,
"data" : {
"table_prefix" : "myprefix_",
"WP_DEBUG" : false,
"DB_NAME" : "cpuser_wp_navhv",
"DB_CHARSET" : "utf8",
"DB_HOST" : "localhost:3306",
"DB_USER" : "cpuser_wp_wjti5"
}
},
"func" : "get_db_settings"
}
Check if the maintenance mode is enabled or not.
ARGUMENTS
Required. The wp toolkit instance id.
REPLY
The reply contains the following attributes in the data section.
true when maintenance mode is enabled false when maintenance mode is disabled
EXAMPLES
* Check the maintenance mode status
uapi --user=cpuser --output=jsonpretty WP maintenance_mode_status instance_id=ID
The returned data will contain a structure similar to the JSON below:
{
"func" : "maintenance_mode_status",
"result" : {
"data" : {
"active" : false
},
"errors" : null,
"warnings" : null,
"status" : 1,
"messages" : null,
"metadata" : {}
},
"apiversion" : 3,
"module" : "WP"
}
Disable the maintenance mode when activated.
ARGUMENTS
Required. The wp toolkit instance id.
REPLY
Success when we can disable the maintenance mode. Note: disabling the maintenance mode when disabled lead to a failure.
EXAMPLES
* Disable the maintenance mode
uapi --user=cpuser --output=jsonpretty WP maintenance_mode_disable instance_id=ID
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"func" : "maintenance_mode_disable",
"result" : {
"errors" : null,
"warnings" : null,
"status" : 1,
"metadata" : {},
"messages" : null,
"data" : null
},
"module" : "WP"
}
Get the maintenance mode settings.
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLES
* Get the current maintenance settings
uapi --user=cpuser --output=jsonpretty WP maintenance_mode_settings instance_id=ID
The returned data will contain a structure similar to the JSON below:
{
"func" : "maintenance_mode_settings",
"apiversion" : 3,
"module" : "WP",
"result" : {
"messages" : null,
"errors" : null,
"data" : {
"templateFilePath" : "/home/tuesday/public_html/tuesday.tld/wp-content/maintenance/template.phtml",
"defaultSocialNetworks" : {
"twitter" : "https://twitter.com/cPanel",
"instagram" : "https://instagram.com/cPanel",
"facebook" : "https://www.facebook.com/cPanel"
},
"fullMode" : false,
"timer" : {
"minutes" : 0,
"hours" : 0,
"enabled" : false,
"days" : 0
},
"socialNetworks" : {
"facebook" : "https://www.facebook.com/cPanel",
"instagram" : "https://instagram.com/cPanel",
"twitter" : "https://twitter.com/cPanel"
},
"texts" : {
"header" : "The website is undergoing scheduled maintenance.",
"subheader" : "Sorry for the inconvenience. Come back a bit later, we will be ready soon!",
"title" : "Scheduled Maintenance"
}
},
"warnings" : null,
"metadata" : {},
"status" : 1
}
}
Update the maintenance mode settings for a WPTK instance and enable it if requested.
ARGUMENTS
Required. The wp toolkit instance id.
Optional. The maintenance page 'title'.
Optional. The maintenance page 'header'.
Optional. The maintenance page 'subheader'.
Optional. Enable or not the timer on the maintenance page.
Optional. Set the timer 'days' value.
Optional. Set the timer 'hours' value.
Optional. Set the timer 'minutes' value.
Optional. The maintenance social network url for 'instagram'.
Optional. The maintenance social network url for 'facebook'.
Optional. The maintenance social network url for 'twitter'.
Optional. Enable the maintenance mode or not. (default false)
Optional. Set this boolean to true to recover the original background image.
EXAMPLES
* Update the settings and get the preview URL
uapi --user=cpuser --output=jsonpretty WP update_maintenance_mode instance_id=ID
* Enable the maintenance mode
uapi --user=cpuser --output=jsonpretty WP update_maintenance_mode instance_id=ID enable=1
uapi --user=cpuser --output=jsonpretty WP update_maintenance_mode instance_id=ID enable=1 \
title="Site in maintenance" header="Page Header" subheader="Page SubHeader"
uapi --user=cpuser --output=jsonpretty WP update_maintenance_mode instance_id=ID enable=1 \
timer_enabled=true timer_days=1 timer_hours=21 timer_minutes=42
uapi --user=cpuser --output=jsonpretty WP update_maintenance_mode instance_id=ID enable=1 \
facebook="https://facebook.com/MyAccount" \
instagram="https://instagram.com/MyAccount" \
twitter="https://twitter.com/MyAccount"
The returned data will contain a structure similar to the JSON below:
{
"func" : "update_maintenance_mode",
"apiversion" : 3,
"result" : {
"warnings" : null,
"errors" : null,
"metadata" : {},
"data" : {
"status" : true
},
"status" : 1,
"messages" : null
},
"module" : "WP"
}
List the WordPress users.
ARGUMENTS
Required. The wp toolkit instance id.
Optional. Filter the users with a specific role.
Optional. Customize the list of fields from the output. (Can provide one or multiple)
EXAMPLES
* List users for an instance
uapi --user=cpuser --output=jsonpretty WP user_list id=134
uapi --user=cpuser --output=jsonpretty WP user_list id=134 role=administrator
uapi --user=cpuser --output=jsonpretty WP user_list id=134 role=administrator field=display_name field=user_email field=ID
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"module" : "WP",
"func" : "user_list",
"result" : {
"data" : [
{
"user_login" : "mytest",
"roles" : "subscriber",
"user_email" : "me@domain.tld",
"user_registered" : "2023-02-20 23:19:35",
"display_name" : "mytest",
"ID" : 2
},
{
"ID" : 1,
"display_name" : "admin",
"user_registered" : "2023-02-13 23:16:58",
"user_email" : "admin@xpp53.tld",
"roles" : "administrator",
"user_login" : "xpress"
}
],
"errors" : null,
"messages" : null,
"warnings" : null,
"status" : 1,
"metadata" : {
"transformed" : 1
}
}
}
Create a WordPress user.
ARGUMENTS
Required. The wp toolkit instance id.
Required. The user login. (unique)
Required. The user email. (unique)
Optional. The display_name to use for the user.
Optional. The user first_name.
Optional. The user last_name.
EXAMPLES
* Create a user
uapi --user=cpuser --output=jsonpretty WP user_create id=134 login=mytest4 email=me4@domain.tld
uapi --user=cpuser --output=jsonpretty WP user_create id=134 login=mytest4 email=me4@domain.tld role=editor
{
"result" : {
"messages" : null,
"errors" : null,
"status" : 1,
"data" : {
"msg" : "User ”mytest4” successfully created.",
"ID" : 6
},
"warnings" : null,
"metadata" : {}
},
"apiversion" : 3,
"func" : "user_create",
"module" : "WP"
}
Delete a WordPress user. When deleting a user, posts are reassigned to the first admin user found.
You cannot delete the last remaining admin user.
ARGUMENTS
Required. The wp toolkit instance id.
Required. The user identifier: ID (interger) or email or login.
EXAMPLES
* Deleting a user
uapi --user=cpuser --output=jsonpretty WP user_delete id=134 user=5
uapi --user=cpuser --output=jsonpretty WP user_delete id=134 user=userlogin
uapi --user=cpuser --output=jsonpretty WP user_delete id=134 user=user@email.tld
{
"func" : "user_delete",
"result" : {
"messages" : null,
"status" : 1,
"warnings" : null,
"metadata" : {},
"errors" : null,
"data" : "User ”xyz” successfully deleted."
},
"apiversion" : 3,
"module" : "WP"
}
Update an existing user identified by its unique id ( ID, login or email ).
You can update one or more of the following fields. At minimum one optional parameter need to be provided.
ARGUMENTS
Required. The wp toolkit instance id.
Required. The user unique id: ( ID, login or email )
Optional. The updated user role.
Optional. The display_name to use for the user.
Optional. The user first_name.
Optional. The user last_name.
EXAMPLES
* Update a user
uapi --user=cpuser --output=jsonpretty WP user_update id=134 user=123 display_name=ThisIsMe
uapi --user=cpuser --output=jsonpretty WP user_create id=134 user=bob role=editor first_name=Bob last_name=Bob
{
"apiversion" : 3,
"func" : "user_update",
"module" : "WP",
"result" : {
"errors" : null,
"warnings" : null,
"status" : 1,
"data" : "User ”Bob” successfully updated.",
"metadata" : {},
"messages" : null
}
}
List the backups for an instance
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLES
* List all backups
uapi --user=cpuser --output=jsonpretty WP backup_list instance_id=50
The returned data will contain a structure similar to the JSON below:
{
"func" : "backup_list",
"apiversion" : 3,
"result" : {
"warnings" : null,
"errors" : null,
"metadata" : {},
"messages" : null,
"status" : 1,
"data" : {
"backups" : [
{
"createDate" : "2023-02-08T21:14:13+00:00",
"fileSize" : 31100915,
"absoluteFilePath" : "/home/xpress/wordpress-backups/yourdomain.tld__2023-02-08T21_14_13+0000.tar.gz",
"fileName" : "yourdomain.tld__2023-02-08T21_14_13+0000.tar.gz"
}
]
}
},
"module" : "WP"
}
Perform a backup. Note: this is using SSE and you can track the status using the sse_url from the task.
ARGUMENTS
Required. The wp toolkit instance id.
EXAMPLES
* Perform a backup
uapi --user=cpuser --output=jsonpretty WP backup_perform instance_id=50
The returned data will contain a structure similar to the JSON below:
{
"module" : "WP",
"result" : {
"data" : {
"task_id" : "00000000/63e53646d705c0",
"task" : {
"args" : {
"log_file" : "/home/xpress/.cpanel/logs/wp_1675966022.87987_backup_perform.73.1675966022.log",
"instance_id" : "73"
},
"action" : "backup_perform",
"sse_url" : "/sse/UserTasks/00000000_63e53646d705c0/wp_1675966022.87987_backup_perform.73.1675966022.log",
"subsystem" : "WordPress"
}
},
"errors" : null,
"warnings" : null,
"metadata" : {},
"messages" : null,
"status" : 1
},
"func" : "backup_perform",
"apiversion" : 3
}
Restore a backup for an instance. Note: this is using SSE and you can track the status using the sse_url from the task.
ARGUMENTS
Required. The wp toolkit instance id.
Required. The backup to restore identified by its fileName. Warning: be careful about the encoding and the usage of the '+' chacracter in the call. It needs to be encoded to '%2B'.
EXAMPLES
* List all backups
uapi --user=cpuser --output=jsonpretty WP backup_restore id=73 fileName='yourdomain.tld__2023-02-08T21_36_13%2B0000.tar.gz'
The returned data will contain a structure similar to the JSON below:
{
"apiversion" : 3,
"module" : "WP",
"result" : {
"data" : {
"task_id" : "00000000/63e5370cd4a39a",
"task" : {
"args" : {
"instance_id" : "73",
"log_file" : "/home/xpress/.cpanel/logs/wp_1675966220.87016_backup_restore.73.yourdomain.tld__20230208T21_36_130000.tar.gz.1675966220.log",
"fileName" : "yourdomain.tld__2023-02-08T21_36_13+0000.tar.gz"
},
"action" : "backup_restore",
"sse_url" : "/sse/UserTasks/00000000_63e5370cd4a39a/wp_1675966220.87016_backup_restore.73.yourdomain.tld__20230208T21_36_130000.tar.gz.1675966220.log",
"subsystem" : "WordPress"
}
},
"metadata" : {},
"warnings" : null,
"status" : 1,
"errors" : null,
"messages" : null
},
"func" : "backup_restore"
}
Check the status of WP Toolkit smart-update.
ARGUMENTS
Required. Provide the instance_id
REPLY
In case of success, the reply contains an entry for 'smartUpdate'. True when smart-updates are enabled, false when disabled.
EXAMPLES
* Checking smart-update status
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP smart_update_status id=ID
In this example smartUpdate are enabled.
{
"result" : {
"messages" : null,
"status" : 1,
"warnings" : null,
"metadata" : {},
"errors" : null,
"data" : {
"smartUpdate" : 1
}
},
"apiversion" : 3,
"func" : "smart_update_status",
"module" : "WP"
}
Disable WP Toolkit smart-update for an instance.
ARGUMENTS
Required. Provide the instance_id
EXAMPLES
* Disabling smart-update
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP smart_update_disable id=ID
{
"apiversion" : 3,
"func" : "smart_update_disable",
"module" : "WP",
"result" : {
"errors" : null,
"messages" : null,
"metadata" : {},
"warnings" : null,
"data" : null,
"status" : 1
}
}
Enable WP Toolkit smart-update for an instance.
ARGUMENTS
Required. Provide the instance_id
EXAMPLES
* Enabling smart-update
Then run the uapi call:
uapi --user=cpuser --output=jsonpretty WP smart_update_enable id=ID
{
"apiversion" : 3,
"func" : "smart_update_enable",
"module" : "WP",
"result" : {
"errors" : null,
"messages" : null,
"metadata" : {},
"warnings" : null,
"data" : null,
"status" : 1
}
}
WP CLI Documentation: https://developer.wordpress.org/cli/commands/