This function configures a WordPress cPAddon instance's automatic updates settings. If you enable automatic updates for a legacy WordPress cPAddon instance, the function will convert it to use the RPM-based WordPress cPAddon.
Important:
This function changes the instance's automatic update setting in the wp-config.php
file. Before you run this function, you should verify that a filter does not exist for the automatic update settings. Use the get_instance_by_id
function and view the autoupdate.core.has_filter
return to determine if a filter exists.
Note:
You must install the WordPress Manager cPanel plugin to access this API function.
uapi --output=jsonpretty \ --user=username \ WordPressInstanceManager \ configure_autoupdate \ id='cPanel__Blogs__WordPressX.0.1491917088' \ autoupdate.core.major='0' \ autoupdate.core.minor='0'
{- "apiversion": 3,
- "func": "configure_autoupdate",
- "module": "WordPressInstanceManager",
- "result": {
- "data": {
- "after": {
- "addon_config": "/home/example/.cpaddons/cPanel::Blogs::WordPressX.0.yaml",
- "addon_name": "cPanel::Blogs::WordPressX",
- "addon_type": "modern",
- "admin_url": "example.com/wordpress-41/wp-login.php",
- "admin_username": "wpadmin",
- "available_version": "4.9.1",
- "current_version": "4.9.1",
- "db_name": "example_wp1",
- "db_prefix": "example",
- "db_server": "localhost",
- "db_type": "mysql",
- "db_username": "example_wp1",
- "domain": "example.com",
- "full_path": "/home/example/public_html/wordpress-41",
- "homedir": "/home/example",
- "id": "cPanel__Blogs__WordPress.1.1509732223",
- "initial_install_version": "4.1",
- "migrated_from": "cPanel::Blogs::WordPress",
- "migrated_on": 1513965986,
- "rel_path": "wordpress-41",
- "site_url": "example.com/wordpress-41"
}, - "before": {
- "addon_config": "/home/example/.cpaddons/cPanel::Blogs::WordPressX.0.yaml",
- "addon_name": "cPanel::Blogs::WordPress",
- "addon_type": "legacy",
- "admin_url": "example.com/wordpress-41/wp-login.php",
- "admin_username": "wpadmin",
- "available_version": "4.9.1",
- "current_version": "4.9.1",
- "db_name": "example_wp1",
- "db_prefix": "example",
- "db_server": "localhost",
- "db_type": "mysql",
- "db_username": "example_wp1",
- "domain": "example.com",
- "full_path": "/home/example/public_html/wordpress-41",
- "homedir": "/home/example",
- "id": "cPanel__Blogs__WordPress.1.1509732223",
- "initial_install_version": "4.1",
- "rel_path": "wordpress-41",
- "site_url": "example.com/wordpress-41"
}
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}