Installing WordPress via the REST API

Discussion in 'General' started by Ed Cates, Apr 11, 2019.

  1. Ed Cates

    Ed Cates New Member

    Note: I'm working specifically with WordPress, but this is likely applicable to APS packages in general.
    I'm trying to write a script that installs WordPress for users automatically via the REST API. I've reached the point where no errors are generated, and information gets entered into the aps_instances and aps_instances_settings tables, but the installation never actually kicks off, and the instance_status in aps_instances stays stuck on 1.

    The script is calling sites_aps_install_package( $session_id, $package_id, $params). $params contains:
    'main_location' => '',
    'main_domain' => $domain,
    'main_database_host' => 'localhost',
    'main_database_name' => $main_database_name,
    'main_database_login' => $main_database_login,
    'main_database_password' => $main_database_password,
    'admin_name' => $adminstring,
    'admin_password' => $testingPassword,
    'install' => '0',
    'locale' => 'en-US',
    'license' => 'on'​
    with everything getting entered in to aps_instances_settings as expected.
    I am by no means an accomplished developer, and think I've hit a wall with this one.

Share This Page