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!

Mass-upload files to all accounts

Discussion in 'General Discussion' started by Cyberflag, Sep 7, 2008.

  1. Cyberflag

    Cyberflag Registered

    Joined:
    Sep 7, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    Hello! I would like to know how can i mass upload files to all accounts. For example: all my accounts have common files, let's say config.php and index.php. Sometimes, i'll need to update those files in ALL accounts and i would like to know how i can do that.

    Thanks in advance! :)
     
  2. Garrison

    Garrison Registered

    Joined:
    Sep 19, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    I also would like to know how to do this.
     
  3. rejected

    rejected Well-Known Member

    Joined:
    Sep 19, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    156
    Make sure Apache is set to follow Symbolic Links then each account SymLink config.php and index.php to 1 central folder eg.

    /usr/lib/webroot/
    index.php

    /home/user/public_html/
    index.php -> /usr/lib/webroot/index.php
    ln -s /usr/lib/webroot/index.php /home/user/public_html/index.php

    That way when you update /usr/lib/webroot/index.php it will update all sites
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Garrison

    Garrison Registered

    Joined:
    Sep 19, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    How can i SymLink files? PHP?

    I'm using a shared reseller account on HostGator.
     
    #4 Garrison, Sep 22, 2008
    Last edited: Sep 22, 2008
  5. lvlind

    lvlind Active Member

    Joined:
    Jun 7, 2007
    Messages:
    33
    Likes Received:
    1
    Trophy Points:
    156
    Location:
    Vinnica, Ukraine
    Ftp

    The best and easiest way upload all your files in account is using FTP. :)
    Do you have FTP access?
    If you want upload all files (same files), you can setup a cron job like
    scp -rp * user@XXX.XXX.XXX.XXX:/home/ or something similar =)
     
  6. Garrison

    Garrison Registered

    Joined:
    Sep 19, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    lvlind, wouldn't i need to create this cron job in all accounts? I need something easy and fast. I did not understand the SymLink method, however, i think i must execute this code through SHH for all the files i want to be updated on all servers, am i right?

    -s /usr/lib/webroot/index.php /home/user/public_html/index.php
     
  7. Garrison

    Garrison Registered

    Joined:
    Sep 19, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    Bumping message.
     
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