Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Serverwide exchange of specific string in pages and sqlDBs

Discussion in 'General Discussion' started by caylean, May 3, 2018.

  1. caylean

    caylean Active Member

    Joined:
    Jul 2, 2013
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hey Guys,
    I have a probleme here right now. I have just gotten 70 Domains from an old Webmaster and the transfer and everything went pretty smooth with WHM and for being a Novice like me.

    Right now I am looking for a way to change in .html, .php and .htm (unlikely, but who knows) als also in all Databases some strings.
    To be more precise, I wish to change "w=12345&w" to "w=54321&w" ..How can this feat be accomplished? I have no clue where I have to change these Datas all. All pages are absolutely new to me and so I will take a huge lot of time to check each and every domain. While there are like 50 Blogs with a total of like 300+ MultiUser Blogs that I would have to check manually.

    Example: find . -type f | xargs -d "\n" perl -pi -e 's/w=12345&w/w=54321&w/g'
    This SHOULD work I THINK... but then again, it only works with Files, but not Databases, right?

    I had found some search and replace codes that could be used in SSH, but most of them were with rules that either didn't apply to me, or made no sense to me AND always seem to explude Databases. To databases I couldn't find anything that would do this process serverwide...

    Is there anything I can do from WHM to accolplish that and if not are there like twi lines of code I can just hit and have all the affiliate codes that are hidden in sidebars/postings/static pages to be modified?

    I would be really glad if you could help me.
     
    #1 caylean, May 3, 2018
    Last edited: May 3, 2018
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,851
    Likes Received:
    135
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. caylean

    caylean Active Member

    Joined:
    Jul 2, 2013
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    So it actually looks like that there is no real way to do this from ssh? ... quite strange for me, but well, then the sql dump seems to be the easiest way for me to deal with it.

    Thanks
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice