The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    1
    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:
    0
    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
     
  4. Garrison

    Garrison Registered

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

Share This Page