Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:51:11+00:00 2026-05-27T05:51:11+00:00

I am planing to build a CMS-system. The CMS system will be located and

  • 0

I am planing to build a CMS-system.

The CMS system will be located and fully administrated at:
http://www.mycompany.com/customer

The final website will be located at:
http://www.customer.com

I need to figure out the best way to copy files (eg. images)
from: http://www.mycompany.com/customer/media
to: http://www.customer.com/media

Note: The CMS and customer page will be located on different hosts. And I want to build this function using PHP.

Some thoughts:

The optimal solution would be if the two directories could be cloned automaticly, no matter how the images are uploaded or updated. Maby if there is a way to detect changes to http://www.mycompany.com/customer/media, then http://www.customer.com/media could be notifyed about it and send a request to update the image.

A wish would also be that images only could be accessed from http://www.mycompany.com/customer/media if logged in to the CMS :S

Any tips?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:51:12+00:00Added an answer on May 27, 2026 at 5:51 am

    You should not use FTP (insecure), or PHP for the replication,
    try rsync instead :-

    What is rsync ?
    http://en.wikipedia.org/wiki/Rsync

    rsync is a software application and network protocol for Unix-like and Windows systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. rsync can copy or display directory contents and copy files, optionally using compression and recursion.

    In another word, is designed meant for mirroring or replicating (is industry standard)

    In general,

    1. setup public key to allow source server to able to ssh into destination server
    2. setup a cronjob in the source server to do rsync

    What does the cronjob do ?
    In nutshell, it should rsync the selected source directory to destination server,
    a quick example :-

    * * * * * rsync -avz /home/www.mycompany.com/www $HOST:/home/www.customer.com/www
                         ^ source server directory   ^ destination server, 
                                                       and directory
    

    However, rsync is too hard to describe in few sentences, you can take a look :-
    http://www.cyberciti.biz/tips/linux-use-rsync-transfer-mirror-files-directories.html (as a start)

    Other possibilities is make use of version controlling software, like -:

    1. git
    2. svn

    Or make use on CDN (like @Amir Raminfar has mentioned), which itself is already a complete solution for file distribution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm planning to build a website that will be a simple CMS where users
I am planning to build a cassandra store system and also I need a
I am planing to build an android app, which will have user posted content
I am planing to build a simple web dictionary system with Kohana 3. categories
I am planning to build a website completely in Flex. All the contents will
I am planing to build a website using PHP to be hosted on the
I am planning to build a case management system from scratch, The system will
I'm planning to build a CMS in PHP and MySQL, mainly for my own
I am planning to build a training site which will accommodate multiple users. It
I am planning to build a website. I can build the front end with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.