I have 2 Private Server and 1 Shared hosting. 1 of my private server is not much in use, but my shared hosting is getting overloaded with images running wordpress.
I want to set my own CDN with my private server. I have already done below things :-
- Create CDN subdomain of my site ( http://cdn.example.com with CNAME of my private server. )
- Added CDN subdomain to my Private Server ( http://cdn.example.com )
I need help in below two things :-
- Whenever image is uploaded , it instantly gets uploaded to my CDN server, that i have created in my VPS.
- All images starts loading from my CDN server like :- http://cdn.example.com/wp-content/uploads/2015/10/1.jpg
For 2, I think, There is option to use ".htaccess" , but I am too much worried about point 1, how to make wordpress upload my file to CDN instead of local folder.
Please do not comment and reply with , Use CDN company like maxcdn etc., I can't afford to pay 1 extra cent to CDN at the moment.
I need solution strictly based on my requirement above.
Any help would be highly appreciated.
Thanks