Can I share the /uploads/ folder between multiple WordPress servers?

I have a wordpress blog which is replicated, i.e. 2 servers behind load balancer serve the same wordpress blog. I pointed the database on both servers to the same database so I have no problem there. However, when a user is forwarded (by the load balancer) to server-1 and uploads files, they are kept on server-1. The same goes for server-2. Those files are not shared between the 2 servers and therefore user who is forwarded to server-2 will not see the files (e.g. images) which were uploaded to server-1.

I read that the upload folder can be changed but “This path can not be absolute. It is always relative to ABSPATH”.

Read More

What are the best practices to share the upload folder between servers?

Related posts

Leave a Reply

2 comments

  1. Options:

    1. Set something up to replicate files between servers. ie: rsync in a cron job
    2. Mount a network share to the uploads folder on both servers.