Hi,
I am using Softaculous API for installing WordPress.
I have a custom theme created for installation which I want to use in all my API calls. Is it possible to apply and activate that theme and also delete all other themes?
PS - Big fan of Softaculous! It makes our life so easy.
You will get the path to installation and database credentials as parameters in this hook. You can use the same to unzip the theme files and to update the database about the selected theme.
In order to activate a theme you need to update the options table in the database
Here is the sample query :
UPDATE `wp_options` SET `option_value` = 'twentyseventeen' WHERE `option_name` = 'template' OR `option_name` = 'stylesheet';