Jump to content
UBot Underground

Recommended Posts

I own ubot standard edition. Currently I use ubot to setup a ton of accounts and databases on my server then I use a perl script to deploy the wordpress files to each account. The next part of my workflow is I need to go through and edit each wp-config file in each folder to match my database info.

 

Since I think i can only do work on the web i went to a browser based ftp site and was able to get to the point where i open the wp-config file for editing. Now i need to know how to fine the current database info and replace it with the correct database info. Is there any way we can do a find and replace in a input box?

 

Or is there some other way I should go about doing this?

Link to post
Share on other sites

What I would do, is in the flow of the script set a variable containing that whole file...EXCEPT...where you need replacing just throw in some unique strings or characters and do a replace, or replacements just prior to uploading (You would save it to the file wp-config.php)...if that makes sense.

 

John

Link to post
Share on other sites

What I would do, is in the flow of the script set a variable containing that whole file...EXCEPT...where you need replacing just throw in some unique strings or characters and do a replace, or replacements just prior to uploading (You would save it to the file wp-config.php)...if that makes sense.

 

John

 

ok so what you are saying is to put wp-config into a variable and change the mysql info to something unique. Then to step through my csv to replace that unique mysql info with the info in my csv file that i used to set up my databases in the first place. I am able to do this in the standard edition? :)

 

Ok let me add more info to this thread. I have set up my wp-config.php file to look like this:

define('DB_NAME', '555841_xxxxxx');

/** MySQL database username */
define('DB_USER', '555841_vvvvvv');

/** MySQL database password */
define('DB_PASSWORD', 'cccccc');

/** MySQL hostname */
define('DB_HOST', 'aaaaaa');

 

since xxxxxx and so forth would be unique strings no where else in the document I should be able to edit them with my csv data. I cant wrap my head around how to do this though. Any help would be much appreciated.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...