ISPConfig automated Wordpress installation

Discussion in 'General' started by Petr Čapek, Jan 7, 2023.

  1. Petr Čapek

    Petr Čapek New Member

    Hello everyone, i use ISPConfig for Wordpress websites only. But it is really annoying to open remote desktop everytime when creating a new website and install Wordpress manually in there. I was thinking about some automatization, for example checkbox in ISPConfig to run the installation script when creating new website. I was looking at Directive Snippets aswell as into conf and conf-custom directories but could not find anything. Is there someone who can help me?

    Thank you so much!
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    There is none. Do search the forum if anyone have that shared, if any. Or google for it.
    For what? There are a lot on how to make WP works. Also about conf and conf-custom directories. Again do search the forum first for what you want.
     
    Last edited: Jan 17, 2023
  3. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    you'd have to make an interactive script / have a config form first, or have a username/password generator as part of your script.
    when creating the website, it would also need to create the database and database user, i'd assume via the ispconfig api, using the details given to the script/form or by the generator. i think using wp-cli in the script would be the easiest way to instal and configurel wordpress, but then you'd also need to create an ssh user for the website, add wp-cli to the jailkit for the website, and run the wp-cli commands as that site owner.
     
    Petr Čapek likes this.
  4. Petr Čapek

    Petr Čapek New Member

    Well, all i need is to create some php file (in my case wordpress_auto_install.php, located in ispconfig/interface/web) with script that would ONLY download and extract Wordpress in a web directory for every new created website. Something like this:

    Code:
    <?php
    function add_wordpress($client_id, $domain) {
        # Download and extract WordPress
        exec("wget https://wordpress.org/latest.tar.gz");
        exec("tar -xzvf latest.tar.gz");
        # move files to webroot
        exec("mv wordpress/* /var/www/clients/$client_id/$domain/web");
    }
    And then create new entry, but i dont really know where.. I tried to place code below into ispconfig/server/lib/config.inc.php but it doesnt work.
    Code:
    $conf['interface_modules']['wordpress_auto_install'] = 'usr/local/ispconfig/interface/web/wordpress_auto_install.php';
    Is there someone who can help me?
     
  5. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    But it'd be much better to configure the database immediately as well... so it's a bit more work.
     
  6. helmo

    helmo Member HowtoForge Supporter

    Sure, I'd like to have such a feature as well.
    I think it's better to model this after the plugin's we have. E.g server/plugins-available/apache2_plugin.inc.php
     
  7. helmo

    helmo Member HowtoForge Supporter

    ahrasis, 0658 and Mateus Magen like this.
  8. Mateus Magen

    Mateus Magen New Member

    I'm very insterested with this soluction, please go ahead!
     
  9. 0658

    0658 Member

    What is status on this? this would be a wonderful plugin
     
    Mateus Magen likes this.
  10. pecka33

    pecka33 Member

    Hello,

    is here something news about this? Or any auto installer of wordpress and other open source via ispconfig?
     
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    No news so far.
     

Share This Page