WP Customization - adding lines in wp-config.php

SDK Docs: http://installatron.com/developer/apps
SDK GUI Editor: http://installatron.com/editor
l.milvio
Posts: 2
Joined: Sun Aug 05, 2012 3:03 am

WP Customization - adding lines in wp-config.php

Postby l.milvio » Sun Aug 05, 2012 3:13 am

Greetings,

I'm trying to customize WP installation and I can't add some lines I need to wp-config.php. I need them to be added on a specific point... I suspect my problem is REGEX bound as I'm still trying to get that right! :P

my not-working code snippet is:

Code: Select all

$o->sr("wp-config.php", "#'define\(\'WP\_DEBUG\'\,false\)\;'#", "
define('WP_DEBUG',false); define('WP_CACHE', true);");


thank in advance for your time! :)

Luca

*edited typo*

Phil
Staff
Posts: 488
Joined: Tue Jun 19, 2007 6:06 am

Re: WP Customization - adding lines in wp-config.php

Postby Phil » Tue Aug 07, 2012 7:14 am

Hello,

Please try this:

Code: Select all

$o->sr("wp-config.php", "#define\(.WP_DEBUG.,\s*false\);#", "define('WP_DEBUG',false);define('WP_CACHE', true);");


If issues persist let us know.

Thanks,
Phil
Phillip Stier
Installatron Co-Founder

l.milvio
Posts: 2
Joined: Sun Aug 05, 2012 3:03 am

Re: WP Customization - adding lines in wp-config.php

Postby l.milvio » Tue Aug 07, 2012 7:56 am

It works perfectly, thanks!! :mrgreen:

I'm flooding you with requests here and using tickets, sorry Phil...

Is there a way to retrieve username and password for the main FTP account during customization?
I'd like to add that info into wp-config.php thanks a lot in advance

Phil
Staff
Posts: 488
Joined: Tue Jun 19, 2007 6:06 am

Re: WP Customization - adding lines in wp-config.php

Postby Phil » Tue Aug 07, 2012 8:15 am

Hello,

I'm afraid the web hosting account's main FTP password isn't something we can retrieve. However, the FTP username is usually the value in the $o->install->owner["user"] variable.

You may be able to use your control panel's API to _create_ a FTP login for the install, however whenever possible we recommend the Suexec model for PHP which bypasses any need for this (SuPHP, etc.).

The number of requests is no problem. If there's anything further we can assist with let us know. :)

Thanks,
Phil
Phillip Stier
Installatron Co-Founder


Return to “Application Packaging SDK and Application Customizations”

Who is online

Users browsing this forum: No registered users and 1 guest