Default script installers not working for WordPress

I am referring to System Settings > Server Templates > Default Settings > Default script installers:

I set it to install Script: WordPress, Version: Latest available, URL path: /, Database name: Main database, DB type: MySQL.

After I Create Virtual Server, it doesn't install WordPress automatically. Is there something I need to configure to make it auto-install WordPress?

Status: 
Closed (fixed)

Comments

Howdy -- just to verify, when adding your new Virtual Server, did you use the same Server Template where WordPress was configured?

If so -- do you have the same problem with other Install Scripts as well? Or is the problem just with WordPress?

I am using the default wordpress.pl installer script. I am focusing on WordPress hosting so I haven't tried any other scripts. I want it to automatically install WordPress to the top level (in public_html, not in /public_html/wordpress), when creating a virtual server. I basically don't need the other scripts.

I am also using Nginx with the Virtualmin module. I can install WordPress fine with the installer, but how do I do it automatically?

Also, is there a way to modify the wordpress.pl script so that it defaults to installing at the top level, instead of the /wordpress directory? I'm guessing this is the relevant portion of the code:


sub script_wordpress_params
{
local ($d, $ver, $upgrade) = @_;
local $rv;
local $hdir = &public_html_dir($d, 1);
if ($upgrade) {
# Options are fixed when upgrading
local ($dbtype, $dbname) = split(/_/, $upgrade->{'opts'}->{'db'}, 2);
$rv .= &ui_table_row("Database for WordPress tables", $dbname);
local $dir = $upgrade->{'opts'}->{'dir'};
$dir =~ s/^$d->{'home'}\///;
$rv .= &ui_table_row("Install directory", $dir);
}
else {
# Show editable install options
local @dbs = &domain_databases($d, [ "mysql" ]);
$rv .= &ui_table_row("Database for WordPress tables",
&ui_database_select("db", undef, \@dbs, $d, "wordpress"));
$rv .= &ui_table_row("Install sub-directory under $hdir",
&ui_opt_textbox("dir", &substitute_scriptname_template("wordpress", $d), 30, "At top level"));
}
return $rv;
}

Well, just for the sake of troubleshooting, could you see if it works when using a different Install Script?

We'd like to figure out if it's an issue specific to WordPress, or if it's related to Install Scripts in general.

Also, to install into the root, you'd set the URL Path to "/" on the "Default Script Installers" screen.

I just changed it try installing SquirrelMail. It doesn't install.

Creating administration group nikanti.net ..
.. done

Creating administration user nikanti.net ..
.. done

Creating aliases for administration user ..
.. done

Adding administration user to groups ..
.. done

Creating home directory ..
.. done

Creating mailbox for administration user ..
.. done

Adding new DNS zone ..
.. done

Adding slave zone on ns2.beta.chumsai.com ..
.. done

Adding to email domains list ..
.. done

Adding default mail aliases ..
.. done

Creating Nginx virtual host ..
.. done

Starting PHP FastCGI server ..
.. done

Adding webserver user nginx to server's group ..
.. done

Setting up log file rotation ..
.. done

Creating MySQL login ..
.. done

Creating MySQL database nikanti_net ..
.. done

Creating FTP virtual server ..
.. done

Adding ProFTPd user ftp to server's group ..
.. done

Setting up spam filtering ..
.. done

Setting up virus filtering ..
.. done

Creating status monitor for website ..
.. done

Creating status monitor for SSL website ..
.. done

Creating status monitor for SSL certifcate ..
.. done

Creating SSL certificate and private key ..
.. done

Adding SSL to Nginx virtual host ..
.. done

Creating Webmin user ..
.. done

Re-starting DNS server ..
.. done

Re-starting slave DNS servers ..
.. done

Applying Nginx configuration ..
.. done

Applying FTP server configuration ..
.. done

Re-loading Webmin ..
.. done

Saving server details ..
.. done

That's the output after creating a Virtual Server. It just refreshes after completing, but no scripts have been installed.

Okay, thanks for the output, and for testing Squirrelmail, that helps!

One more question before I talk to Jamie about what might be causing that -- you mentioned setting this up within the "Default" server template -- is that the server template being used when creating a new Virtual Server?

Oh, also, could you share a screenshot of your "Scripts to install for new virtual servers" screen?

We can use that to assist in the testing that we're doing. Thanks!

The only two templates are the Default Settings, and Settings for Sub-Servers. I haven't made any new server templates. In the Default Settings > Basic settings and usage > Initially selected template for top-level servers? Yes.

Is that what you're talking about?

If you need to ssh to root, just let me know.

the attached image is showing it with WordPress (not SquirrelMail)

I think I see the bug here - you are using Nginx on this system instead of Apache, right?

Hi Jamie,

Yes, I'm using Nginx

Ok, that explains it. This will be fixed in the next Virtualmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.