Posted 2 years ago by Pat Ramsey
When it comes to handling media assets at scale (at scale meaning a site with massively high traffic numbers, simultaneous large numbers of images being uploaded, or an inordinately great number of images in the media library) WordPress will require customization to remain performant. The demands that a large-volume website places on WordPress and its server infrastructure are where challenges often arise. How much memory PHP has available or a lack of storage space on the server, are two areas that require special attention for a site to remain running at scale. These are areas outside of the code that’s in WordPress. With a WordPress-powered site, since it is the CMS and the interface site users see, the perception can be that WordPress media management isn’t capable of keeping up with high-volume demands. However this narrative is false. With some adjustments and planning, WordPress can be the right choice to handle Enterprise-level, media asset requirements.
How much media is WordPress managing?
How fast is that number increasing?
The underlying issue with WordPress media management lies with the number of digital assets that have to be kept on-hand in the Media Library, and how many new assets are being created and added to the Media Library. Asked a different way, how many files have to be kept and how fast is that number increasing over time? A high-volume site can quickly go from a single terabyte of assets to multiple terabytes in a very short period of time. Media companies, product companies, or any other business that maintains a vast library of digital assets fall into this scenario. A large product line may require numerous videos and images per product, not to mention PDF assets and other documents. If historical data for older products has to be maintained, that adds to the storage requirements. Media companies with libraries of broadcast properties may have numerous seasons, each with its own set of vast digital assets - one-sheets, print materials, multilingual assets, and more.
Conditions for WordPress Media Library Limitation
- Website with massively high traffic numbers.
- Simultaneous large numbers of images being uploaded and processed by WordPress.
- Inordinately great number of images in the media library.
Simply storing these in the “Uploads” folder is not in question. Reliable and fast cloud storage is required, either mapped to the system, so the WordPress Media Library can interact with it or so a custom performant interface is developed that replaces the Media Library. In the latter instance, one possibility is to architect the necessary relationships and data structures, building this with something like Laravel. With the custom-created interface, more complex data structures can be used for faster queries, improving performance working with the vast numbers of assets. Using something like VueJS, easy-to-use interfaces can be created and the WordPress REST API can be used to feed information between Laravel and WordPress.
Addressing the number of new assets being added to WordPress, as mentioned earlier, is also a consideration. Uploading an image into WordPress, by default, means there will be the original image stored on the server, as well as at least three copies: thumbnail, medium, and large sizes. Third-party plugins and custom themes can also define additional sizes, increasing the number of copies created and stored per uploaded image.
For one of Crowd Favorite’s clients in the Entertainment sector, we game planned and built a solution for the scenario where during large media events, several photographers would need the capability to create images, with each uploading a myriad of assets to the website concurrently. If this was a live event, time would be a factor, where the sooner the images get into the site, the better. The photos are very likely being uploaded en masse to the site. One uploaded image results in at least four files on the server, the original plus the three copies. Both the upload and the image processing requires server memory, with each additional image increasing the memory demand. So we had to build a site tuned for high-performance, so the web server wouldn’t run out of memory resulting in failures and site outages.
A solution in this situation is to offload the processing of images to a third-party tool that create images on-demand. This tool listens for images being called in a page and generates them, sizing them on the fly, and storing them for later use. One tool, Thumbor, can be configured to do this, letting you disable image sizing in WordPress. When this is done, WordPress will store only the original uploaded image and won’t create any additional copies. Thumbor handles this entire process, creating the images as they are called by the web server and caches them for later use, further improving performance. As a result, WordPress is better positioned to act as the CMS for the site, instead of performing multiple functions.
The ultimate problem facing WordPress, or other CMS solutions in a high-volume, enterprise-scale website is how best to manage multiple functions and processes simultaneously when dealing with a WordPress Media Library on a highly performant site. A one-size-fits-all solution, like WordPress “out-of- the-box,” will simply break down. When one part of the CMS is over-burdened with a large process, such as traversing terabytes of images, it can take down the whole system. This results in the site being down as opposed to just some of the images being unavailable. Separating functions into multiple independent processes reduces the overall load on any one component and improves the overall performance of the site.
As the original WordPress agency, Crowd Favorite is uniquely positioned to understand the true capabilities and limitations of WordPress. As a result, we strongly believe it’s our responsibility to educate by re-writing some of the existing narratives out there about the platform, using some of the work we’ve done with our clients as examples of how to properly utilize and enhance WordPress to meet the demands of their businesses. Today, we hope we’ve opened your eyes to the power and dynamism that WordPress can provide as it pertains to enterprise-scale media asset management, when built properly. Should you have any questions or we can help you in any way, we’d love to hear from you!