0

I have used Fantastico and Softaculous in the past to install WordPress, however they are limited in that they require me to step through the wizard manually, and they can't set the default theme or install plugins.

Is it possible to write a script that automates the process? Would this be possible in PHP?

Even if it's not possible with a script, I am at least hoping to find a way to set the default WordPress theme upon installation.

brentonstrine
  • 21,694
  • 25
  • 74
  • 120

2 Answers2

1

You can switch themes using the switch_theme function. As for automating, of course it's possible. Your script could grab the wordpress code base with curl, includes a wp_config.php file you've already filled out, read the database info from that file in order to create the database and grant permissions as appropriate, and then run the wp_install process itself.

acobster
  • 1,637
  • 4
  • 17
  • 32
1

You can create a custom script in Softaculous and have your themes or plugins pre installed. Here is the guide : http://www.softaculous.com/docs/Making_Custom_Package

Brijesh
  • 133
  • 1
  • 1
  • 5