Custom WordPress Installer Script in Virtualmin

WordPress (or any other script) can automatically install during Virtualmin > Create Virtual Server.

Virtualmin automatically creates users, MySQL database, and installs WordPress in the public_html root, then gives a link to the WordPress Installer. You can even create a custom installer with a set of plugins and themes.

To create a custom script installer with plugins and themes:

  • Download http://wordpress.org/latest.zip & unzip
    • add some themes and plugins folders in /wp-content/
    • zip as copy-of-latest.zip
  • Create a copy of /usr/libexec/webmin/virtual-server/scripts/wordpress.pl
    • name the copy custompress.pl — this is important because the script requires proper id
    • edit custompress.pl to give a new name: script_wordpress_desc “Custom WordPress”
    • replace ALL instances ofwith(id to match filename)
    • link to your zip:(~line 150 after # script_wordpress_files)
      • this must be retrievable via wget from YOUR SERVER (test this via terminal command)
    • changeto NOT use virtualmin scripts repo! (~line 152)

Your custom file should now look like this:

Try the install:

  • Put custompress.pl in /usr/libexec/webmin/virtual-server/scripts/

Automatic installation with creation of new virtual server:

  • Virtualmin > System Settings > Server Templates > Default Settings > Default Script Installers
    • Custom WordPress

If you want to have the script archive download from a protected web directory, that is also possible:

 

Source: http://chrisgilligan.com/wordpress/automated-wordpress-installation-via-custom-virtualmin-script-installer/



Comments

comments

1 thought on “Custom WordPress Installer Script in Virtualmin”

Leave a Reply