Need help modifying Install Script (WP)

3 posts / 0 new
Last post
#1 Mon, 01/08/2018 - 21:55
greg8872

Need help modifying Install Script (WP)

The default script works good, other than I have to then go in and change the database prefix. I never played with the installer scripts, but skipping some of the options in the wordpress.pl file, I followed the path that ran for me to get to the options before install.

I was able to add in a table row that lets you either pick the default of wp_ or type in a prefix to use.

However, in the code that replaces values in the config file, the prefix comes out empty...

Anyone care to take a look? https://pastebin.com/xzD02MUa

Code added for the form is lines 107 and 108.

Code added to try to modify the prefix is at lines 265 (to try to get it from options, which is failing) and lines 288-290, which I believe is working, just that $prefix is empty.

Any help or pointers on where the option is getting lost, and any info on other parts of the script I should look at for things like upgrade and CLI running.

Thanks

Tue, 01/09/2018 - 15:36
tpnsolutions
tpnsolutions's picture

Hi,

I wouldn't recommend changing the code for a Virtualmin supplied installer script, as it is very likely that these changes will be overwritten if the installer gets updated by Virtualmin.

What are you trying to accomplish, perhaps there's an alternate way which would be easier.

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Fri, 01/12/2018 - 16:08
greg8872

I will be setting this up as a custom script, leaving the original one in place. (Even if overwritten on updates, I can add it back this is not something anyone besides me would have access to anyhow.

Topic locked