WordPress – Upload media to different server

I’ve split the resources on a WP site into two servers: Server A with administration files, Server B with public files. They are connected by the data base.

Are there any way that will cause media that I upload from the WP admin installation on Server A to be stored over on Server B? Whit this, that media will be served from Server B (“public site”).

Read More

If possible, other than through an FTP connection, my client doesn’t want a FTP in the public site 🙁

Thanks in advance!

Related posts

Leave a Reply

1 comment

  1. First, create a remote storage service where you can post the file and return a URL addressing the file on server B. Then you can use wp filters to attain the url from server A.

    You can hook into this filter: “wp_handle_upload”

        apply_filters{
          'wp_handle_upload'
           array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'upload' 
         )
    

    just replace the URL to the new one