I’ve looked and searched here for any best practice for handling and serving media/uploads/images; staying organised and in sync.
I’m using a digital ocean setup and have the uploads content served directly from there.
Ultimately I know media/content should be uploaded to the live site, with copies pulled into development when its necessary to do so. But initial setups/builds always take place locally until theres something worth pushing live/staging.
I use wp-db-sync to keep the database up-to-date in either direction and this works wonderfully.
For uploading/downloading images scp is used.
Is this whats most common or do people make use of CDNs s3 or some other cloud solution?
Any pointers or suggestions welcome, apologies if my question is not direct enough.
For us, the best practice is not keeping uploads on the Wordpress instance at all. Everything goes to S3. Images are served through Imgix, which performs all the image operations such as scaling and cropping on the fly.
Hi @Jon. Gave your plugin a whirl as it solves a key need here. added via composer and went to activate to find it won’t with a fatal error below. On php7, sage9.
atal error: Cannot redeclare render_view() (previously declared in /srv/www/[domain].com/current/web/app/plugins/wp-views/embedded/inc/wpv-api.php:147) in /srv/www/[domain].com/current/web/app/plugins/ilab-media-tools/helpers/ilab-media-tool-view.php on line 77
Call Stack
You have two plugins with the same function name. They should either be prefixing their function name with a unique prefix or using PHP namespaces. You should probably let both of them know their plugin code is causing fatal errors.
We use https://github.com/humanmade/S3-Uploads and it works just fine at scale. Pulling things down to dev is a non-issue because all the correct URLs are in the database.
I can’t remember 100%, but I’m pretty sure it’s relative to where you run the wp command from.
Try navigating to your install and under current - swap the above path for: /web/app/uploads
If that doesn’t work, keep testing it out with different variations. I’m pretty sure /web/app/uploads/ worked for me, when I ran said command from inside the current directory.