❌

Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

WP Offload Media 3.4 Released: WordPress 7.1 Compatible, Preparing For Future Features & Performance Improvements

By: Ian
3 September 2026 at 09:00

We’re super excited to bring you a new release of WP Offload Media.

Version 3.4.0 delivers full support for WordPress 7.1, performance improvements and bug fixes, along with foundational changes that unlock future features and further performance improvements.

WordPress 7.1 Compatible

WordPress 7.1’s client side media handling brings along three new fields to the _wp_attachment_metadata records in the postmeta table related to Media Library items.

Namely:

  • source_image: The uploaded image file that needed to be converted to another format, e.g. an HEIC file.
  • animated_video: The MP4 file created from an uploaded animated GIF.
  • animated_video_poster: A JPG extracted from an uploaded animated GIF to act as a placeholder for the MP4 version.

WP Offload Media now knows about these extra files, and will offload and remove them from the server as appropriate.

To accomplish this, we had to tap in to some in-progress changes to the plugin.

Preparing for the Future

We’ve been working on some changes to the internals of WP Offload Media to prepare for some features our customers have been asking for, while also improving performance, especially for sites with very large Media Libraries.

Custom Table Changes

When you upgrade to WP Offload Media 3.4.0, depending on how many offloaded items you have, you may see an upgrade notice in the settings page.

This upgrade routine will quietly background upgrade WP Offload Media’s metadata related to offloaded items to create a new as3cf_files table that lives alongside the existing as3cf_items table.

Although you won’t be able to make any changes to WP Offload Media’s settings or run any of its bulk management tools while this upgrade is in progress, all existing and new offloads will continue to work as usual.

This new as3cf_files table holds a wealth of information:

  • 1-to-1 mappings of local media files to their path in the cloud storage bucket.
  • Information related to whether the files are private in the bucket or not.
  • A reference to the as3cf_items record which ties multiple files to a Media Library item or BuddyBoss avatar or cover item.

Performance Improvements

The as3cf_files table gives WP Offload Media much improved flexibility in how it keeps track of offloaded media, crucial for supporting the new Media Library metadata fields mentioned above.

However, the new table’s data structure also makes it far simpler and therefore faster for finding matching records when performing unique name checks, or rewriting URLs between their local and remote versions.

WP Offload Media no longer needs to reduce file names down to their base non-sized suffixed name and do potentially expensive LIKE table scans, it can do much simpler equality checks that use indexes for speed.

Because of these changes, it has been possible for us to reduce the processing required when doing URL rewrites. We’ve removed a whole pass through post content and its associated processing, and removed other loops that are no longer required.

We’ve also been able to vastly improve the way we cache the relationship between the URLs in a post’s content with their associated Media Library items. As such, you may see a second upgrade routine notice related to the removal of ye olde amazonS3_cache records from the postmeta table, which will be replaced by much better behaved as3cf_url_cache_local and as3cf_url_cache_remote records.

And for our most advanced customers that have their whole site behind a CDN such as CloudFront, and only use WP Offload Media to manage media in the bucket, we have a big performance boost for you. WP Offload Media no longer implements many of the usual frontend content filters if “Deliver Offloaded Media” is turned off, cutting out a lot of unnecessary checks and processing.

Small Steps

Along with the custom table changes that unlock future features and performance improvements, WP Offload Media will need to change how some of its internal code is organized.

We’re very lucky to have a number of plugins that integrate with WP Offload Media, and are aware of many customers that have custom code that relies on the existing internal API.

As such, we’ve been very careful to make these changes in a backwards compatible way, keeping the existing as3cf_items table data in sync with the data managed in the new as3cf_files table, and ensuring the classes and methods that work with the old data still work.

However, we have marked some functions as deprecated, and do intend to eventually remove them.

Our work in this area is not complete. WP Offload Media still uses some of the deprecated methods itself, and we have plans for further improvements to the data handling that unlock some exciting features, and continue to improve performance.

And More

As always, there’s a number of other bug fixes and improvements in this release.

For a full list of new features, improvements, and bug fixes, see the 3.4 Changelog.

Next Up

We hope you enjoy this foundational release of WP Offload Media.

We’re already working hard on the next release, and are excited to bring you the features and improvements you’ve been asking for.

The post WP Offload Media 3.4 Released: WordPress 7.1 Compatible, Preparing For Future Features & Performance Improvements appeared first on Delicious Brains.

WP Offload Media 3.3 Released: Modern Standards, Global Regions, and Enhanced Stability

3 February 2026 at 16:50

We are excited to announce the release of WP Offload Media 3.3! This release focuses on modernizing our codebase to support the latest server environments, expanding our global footprint with new storage regions, and refining the user experience with key stability improvements.

As WordPress and PHP continue to evolve, we are committed to ensuring WP Offload Media remains the most reliable solution for offloading your assets. Let’s dive into what’s new.

🚀 Embracing Modern Standards: PHP 8.1+ and WordPress 5.9+

To deliver the best performance and security, we have updated the minimum requirements for the plugin. Starting with version 3.3, WP Offload Media now requires PHP 8.1+ and WordPress 5.9+.

By raising these minimums, we can leverage more efficient code and ensure compatibility with the latest technologies. This release introduces full compatibility for PHP 8.4 and PHP 8.5, as well as support for WordPress 6.9.

Additionally, we have updated the underlying AWS PHP SDK to v3.360.1 along with other critical PHP and JS dependencies, ensuring your connection to Amazon S3 remains secure and robust.

🌍 Expanded Global Reach

For users targeting specific geographic audiences, latency matters. We have added support for several new selectable regions across our three major providers:

  • Amazon S3: Asia Pacific (Taipei) and Asia Pacific (New Zealand).
  • Google Cloud Storage: North America (Querétaro) and Europe (Stockholm).
  • DigitalOcean Spaces: Atlanta (ATL1).

These additions allow you to store your media closer to your visitors in these regions, further improving load times.

And even if you use a CDN to provide faster media access to all your site visitors worldwide, being able to use a bucket nearer to your site’s server improves media offload performance.

💾 Improved Metadata Integrity

For those who frequently move media between the cloud and their local server, we’ve made an important improvement to data preservation. Previously, when an item was downloaded from the cloud back to the server, the file size attachment metadata value could be removed.

In version 3.3, this value is no longer removed during the download process, ensuring your attachment metadata remains complete and accurate regardless of where the file currently lives.

🛠️ Integrations and UI Fixes

We are always working to ensure WP Offload Media plays nicely with the rest of the WordPress ecosystem. This release fixes a specific conflict with Rank Math SEO, where deleting an item via the Media Library’s grid mode would fail. This functionality has been restored.

We also polished the user interface on the “Edit Media” page. Now, when you toggle the Public/Private access status of a file, the “Download File” link updates dynamically to reflect the change immediately, without requiring a page refresh.

🤩 And More…

  • Robustness: We’ve added protection against invalid values being passed to the core the_post action, preventing potential crashes.

  • Legacy Support: The legacy file size upgrade routine has been patched so it no longer throws errors if attachment metadata is missing.

For a full breakdown of changes, you can view the changelog.

Are you ready to update? As always, we recommend backing up your site before performing any major updates. Let us know what you think of the new changes in the comments below!

The post WP Offload Media 3.3 Released: Modern Standards, Global Regions, and Enhanced Stability appeared first on Delicious Brains.

Protecting Your WordPress Media: Private Files, Signed URLs, and Access Control

4 September 2025 at 18:34

The WordPress media library serves us well for public content, but what about premium assets, private documents, or confidential client data? The default setup makes every uploaded file publicly accessible via a direct URL. This is a critical limitation for membership sites, digital product stores, and businesses sharing sensitive information.

Relying on direct links in your wp-content/uploads folder means anyone who finds the URL can access your content. This is a significant security risk and, for some sites, a potential loss of revenue.

In this article, we address that challenge. We’ll explore a solution to move beyond basic file storage and achieve granular control over your WordPress media, ensuring your valuable or confidential files are securely delivered only to those with proper authorization.

Understanding Public vs. Private Media

To implement a robust system for media delivery, we first need to define the two core types of media access: public and private.

Prepare for the shock of your life: public files are accessible to the public. This is the default for most files you upload to WordPress. Examples include the images embedded in your blog posts, a company logo, or an ungated download, like a template or case study. These files are not sensitive and are intended to be broadly available to anyone and anything that has the direct URL.

A private file, on the other hand, is not directly accessible. If a user attempts to visit its URL directly, they are denied access. This is essential for protecting content that is part of a paid product, membership, or is otherwise restricted. The challenge is that these files still need to be served to the right people. How do we grant access without making the files public?

Implementing Private File Storage

The fundamental principle of private file storage is to separate the file’s physical location from a public-facing URL. Rather than residing in a standard wp-content/uploads directory where all files are inherently public, we move them to a secure, private location. This is where cloud storage solutions come into play.

WP Offload Media acts as a bridge between your WordPress site and this secure cloud storage. Once configured, you can manage a file’s public or private status directly from the WordPress media library. For individual items, you’ll see a dedicated “Offload” meta box that shows the file’s current “Access” status. This status is a toggle link, allowing you to switch a file between “Public” and “Private” in the bucket. The plugin handles the rest, updating the file’s Access Control List (ACL) in the cloud to restrict direct public access.

It’s worth noting an advanced use case for Amazon S3 and CloudFront: if you have “Block All Public Access to bucket” enabled on your S3 bucket, every file is already private by default. In this scenario, WP Offload Media does not need to update the file’s ACL. Instead, all content is delivered through the CloudFront CDN, which relies on signed URLs to manage private access. With this architecture in place, the challenge is no longer about keeping files private, but rather about securely serving them when needed.

Granting Controlled Access with Signed URLs

With our files securely stored in a private cloud bucket, we face the next challenge: how do we grant temporary, controlled access to an authorized user? The direct URL is no longer an option, and routing every download through a slow, resource-intensive server-side script is a performance bottleneck.

The solution is a signed URL. A signed URL is a secure, temporary, and authenticated link that grants a user permission to access a private file for a limited time. It contains a unique signature and an expiration timestamp, making it impossible to share indefinitely.

The process works as follows: when a user requests a private file (for example, by clicking a button to download a premium PDF), WP Offload Media intercepts that request. Instead of serving the file directly, it securely communicates with your cloud storage provider to generate a unique signed URL. This temporary link is then served to the user, allowing them to download or view the file.

The benefits of this approach are substantial. First, it is highly secure, as the link expires after a set period, preventing it from being shared or abused. Second, it is exceptionally performant. The temporary URL serves the file directly from the high-speed content delivery network of your cloud provider, offloading the work from your WordPress server. This process is also seamless to the end user.

This mechanism is ideal for a wide range of applications, from embedding a private video in a members-only area to creating a secure download link for a software purchase or an e-book. It provides a robust and scalable solution for delivering private content without ever exposing the original file’s location.

Wrapping Up

By moving beyond the default WordPress media library, we have established a robust system for securing and delivering your digital assets. We started by identifying the fundamental difference between public and private files, recognizing that not all media is meant for everyone. We then implemented a solution that stores private files securely in cloud storage, completely out of public reach.

The key to granting access to these files lies in the use of signed URLs, which provide a temporary, authenticated, and secure way for authorized users to view or download content without compromising its privacy.

This approach transforms your WordPress site from a simple content platform into a secure delivery mechanism capable of handling sensitive e-books, premium video content, confidential client documents, and more. You are no longer limited by the inherent public nature of the standard media library. Instead, you have a scalable, performant, and highly secure system that ensures your valuable media is always protected and delivered with precision.

The post Protecting Your WordPress Media: Private Files, Signed URLs, and Access Control appeared first on Delicious Brains.

Using Cloud Storage for WordPress User-Generated Content

14 August 2025 at 19:26

User-generated content is the proverbial double-edged sword. While it’s a powerful engine for engagement, it’s also a significant technical liability. User uploads are often unpredictable, unoptimized, and can consume server disk space and bandwidth at an alarming rate. This unchecked growth directly impacts site performance, inflates hosting costs, and complicates essential maintenance tasks like backups and migrations.

To manage this, you need an architecture designed for scale. This article will guide you through the strategies for offloading user-generated media to dedicated cloud storage. We’ll cover the foundational techniques for handling simple uploads, advanced methods for integrating with complex community plugins, and the critical best practices for managing file optimization and privacy in a UGC-driven environment.

The Unique Challenges of User-Generated Media

Handling user-generated media isn’t simply a matter of scaling your existing /wp-content/uploads directory. It presents a distinct set of architectural challenges that standard media management workflows are ill-equipped to handle. Before implementing a solution, it’s critical to understand the specific problems you need to solve.

Unpredictable Volume and Unoptimized Files

An administrator typically curates and optimizes media before uploading. Users do not. They will upload 8 MB photos directly from their phone for a profile avatar that will be displayed at 150×150 pixels. This creates an environment of unpredictable and explosive growth. A successful forum thread or community event can result in gigabytes of new, unoptimized media being added in a single day, placing an immediate and heavy strain on your server’s disk space and bandwidth.

Complex Privacy and Access Control

User-generated content may not be intended for the public. Consider a student’s assignment submission on an LMS site, attachments in a private message on a BuddyBoss community, or a member’s “friends-only” photo gallery. These files require sophisticated access control. Simply placing them in a publicly accessible cloud storage bucket is not a secure option, as the files could be accessed by anyone with the direct link.

Organizational Chaos

By default, WordPress places all uploads into date-based folders (e.g., /wp-content/uploads/2025/08/). When user content is added to this mix, your server’s filesystem becomes a chaotic blend of blog post images, user avatars, forum attachments, and form uploads. This lack of separation makes programmatic management, manual auditing, or bulk operations on a specific type of user content nearly impossible.

The Backup and Migration Burden

Routine server operations become increasingly burdensome as the /wp-content/uploads directory swells with gigabytes of user content. Full-site backups that once took minutes can take hours, consuming significant server resources and storage space. Migrating the site to a new host becomes a monumental project, involving massive, time-consuming file transfers that are frequently prone to failure. Separating this volatile user data from your core application files is essential for long-term maintainability.

Offloading UGC with WP Offload Media Lite

The foundational strategy for managing user-generated content is to intercept file uploads and redirect them to a dedicated cloud provider like Amazon S3, DigitalOcean Spaces, or Google Cloud Storage. This immediately separates the storage and delivery of these heavy assets from your web server’s primary responsibilities.

For some cases of UGC, this can be accomplished using the free WP Offload Media Lite plugin. Some plugins that allow frontend submissions—such as forms for guest posts, contests, or simple “upload your photo” features—are coded to use the standard WordPress Media Library uploader.

When a user submits a file through one of these forms, WP Offload Media Lite hooks into the process just as it would for an admin upload. The file is automatically copied to your configured cloud bucket, and its URL is rewritten to serve it directly from the cloud. This provides an immediate, effective solution for offloading user content generated through these standard channels.

However, this foundational approach has a critical limitation: it only works if the content-generating plugin funnels uploads through the core WordPress Media Library. This is often not the case for plugins that need more control over files.

For example, BuddyBoss uses custom handlers for avatars and cover images, and the eCommerce plugin Easy Digital Downloads intentionally stores digital products outside of the public Media Library for security. These uploads bypass the standard WordPress hooks and therefore aren’t detected or offloaded by WP Offload Media Lite. Addressing this requires a deeper level of integration.

Advanced Strategies for UGC Management

Overcoming these limitations and properly managing content from complex plugins requires a tool that integrates more deeply with your site’s ecosystem. The licensed version of WP Offload Media provides specific features designed to solve the core challenges of privacy, organization, and compatibility inherent to user-generated content.

Integration with Complex Plugins

One advantage of the licensed version when dealing with user-generated content is its library of purpose-built integrations.

For platforms that bypass the WordPress Media Library, the plugin doesn’t just watch the /uploads folder, it hooks directly into their specific functions. WP Offload Media intercepts the file at its source to ensure it’s offloaded correctly. In addition, it can process all historical content from these integrations, ensuring your entire existing community’s media is migrated to the cloud.

Managing Privacy with Signed URLs

Solving the privacy challenge is critical. You can’t store a customer’s purchased file or a student’s submitted paper in a publicly accessible bucket. WP Offload Media Pro handles this by allowing you to restrict access to offloaded media.

Media Actions

When a legitimate user needs to access the file, the plugin generates a signed, expiring URL on the fly. This unique URL grants temporary access to that specific user, after which it becomes invalid. This is the industry-standard method for serving private content securely from cloud storage, ensuring sensitive files are protected.

Integration-Specific Cloud Organization

Some integrations sort uploaded files into logical paths within your cloud bucket. The level of organization is tailored to the third-party plugin, with some integrations offering highly dynamic structures.

The BuddyBoss integration is the most powerful example of this. It automatically sorts the different types of community media into a structured path system based on context, such as:

  • User Avatars: uploads/avatars/{USER ID}/
  • Group Cover Images: uploads/buddypress/groups/{GROUP ID}/cover-image/
  • Photos & Videos: uploads/bb_medias/{YYYY}/{MM}/

This deep, automatic organization is a key benefit of specific integrations designed to handle complex, user-driven content. However, for many other plugins, the integration’s primary focus is on different challenges, such as security and compatibility.

For many plugins, the most critical function of an integration is to handle security for private files or to ensure that URLs work correctly within complex environments like page builders.

For eCommerce plugins like Easy Digital Downloads and WooCommerce, the integration’s primary role is security. When you upload a digital product, the integration automatically offloads the file, sets its permissions to private in your cloud bucket, and ensures that when a customer makes a purchase, the file is delivered using a secure, expiring URL. This protects your digital assets from unauthorized access.

For page builders like Elementor or plugins like Advanced Custom Fields, the integration focuses on compatibility. These tools often store URLs in their own cached data. The integrations ensure that when media is offloaded or settings are changed, these URLs are correctly found and rewritten, preventing broken images and “mixed content” errors that would otherwise be very difficult to troubleshoot.

Essential Best Practices for Any UGC Platform

A robust storage architecture is the foundation, but a truly resilient UGC platform also requires proactive measures to manage the content itself. Implementing a tool like WP Offload Media solves the “where,” but the following best practices address the “what” and “how” of user content, ensuring your platform is secure and efficient from end to end.

Validate and Sanitize at the Source

The most effective time to stop a problematic upload is before it ever consumes server resources. Your frontend forms are your first line of defense, and it’s critical to implement strict validation to control what users can submit.

This begins with enforcing a strict file type whitelist, where you explicitly define the exact extensions you will accept—such as jpg, png, or pdf—rather than attempting to block specific malicious types. In addition to controlling the file type, you must also set a sensible maximum file size, like 5MB or 10MB, to prevent users from bogging down your server with enormous video files or uncompressed high-resolution images.

Automate Server-Side Image Optimization

You cannot expect your users to upload optimized images. Therefore, you must automate the process on the server. By integrating a plugin like EWWW Image Optimizer, you can process every user-submitted image before it gets offloaded. Such a tool can automatically resize images to appropriate maximum dimensions, apply powerful, lossless compression, and even convert them to efficient formats like WebP. This ensures that only lean, optimized files are sent to your cloud storage, saving on both storage costs and your visitors’ bandwidth.

Establish a Clear Moderation Process

The fact that content was uploaded by a user doesn’t absolve you of the responsibility for what that content is. You must have a clear and consistent moderation workflow in place. Consider whether user-submitted content should be held in a “pending review” state before it goes live, and who on your team is responsible for that review. This should be supported by a public-facing Terms of Service or Acceptable Use Policy that clearly outlines what is and isn’t permitted on your platform, giving you a firm basis for any moderation decisions.

Wrapping Up

User-generated content transforms a website into a living community, but it introduces architectural stresses that can easily undermine the platform’s stability and performance. Treating UGC as just another part of the Media Library is a short-term approach that creates long-term technical debt, resulting in a site that is slow, expensive to maintain, and difficult to migrate.

A professional-grade storage architecture is the solution. By offloading media to a dedicated cloud provider, you immediately solve the core problems of storage and server load. When this foundation is enhanced with deep plugin integrations, secure handling for private files, and disciplined best practices for validation and optimization, you transform UGC from a technical liability into a truly scalable asset.

Ultimately, this is about more than just managing files. It’s about building a technical foundation that allows your community to flourish without limits. By implementing these strategies, you are free to encourage user engagement and foster growth, confident that your platform is engineered to handle the success that follows.

The post Using Cloud Storage for WordPress User-Generated Content appeared first on Delicious Brains.

Preparing Your WordPress Site for High-Traffic: Media Optimization Strategies

7 August 2025 at 14:32

Many successful WordPress sites eventually hit an architectural bottleneck. As traffic scales, the web server struggles to handle the dual responsibilities of running the PHP application and serving a library of heavy media assets. This strain on bandwidth is a primary cause of slowdowns and instability under load.

One solution is to decouple these roles. In this article, we discuss a key strategy for building a truly scalable site: offloading the entire WordPress media library to a dedicated cloud storage provider. We’ll cover the practical steps for implementing this, from handling new uploads to migrating an existing library, integrating a global CDN for elite performance, and complementing the strategy with other essential media optimizations.

Decoupling Your Media from Your Server

The standard WordPress setup bundles the application layer (PHP, database) and the asset layer (images, videos) onto a single server. A core strategy for scalability is to decouple these, assigning each role to a specialized environment. This means moving your media assets from the local server filesystem to a dedicated cloud-based object storage service.

In this model, the roles become clear and efficient:

  • Your Web Server’s Job: Its core competency is executing PHP, handling database queries, and dynamically generating the HTML document for the user. Every request it serves for a static image or video file steals CPU cycles and bandwidth from these critical application tasks.

  • The Cloud Storage Provider’s Job: Services like Amazon S3, Google Cloud Storage, and DigitalOcean Spaces are purpose-built for storing and delivering files with extreme reliability and speed. Their global infrastructure is designed for high-concurrency asset delivery, a task they often perform more efficiently than a general-purpose web server.

Adopting this decoupled architecture can yield immediate and significant advantages in performance and stability. Pages can load faster because browsers can establish more parallel connections to different hostnames. Serving assets from a cloud domain allows media to download concurrently without blocking the main document request from your server. This directly reduces server load. With its bandwidth and processing power no longer consumed by asset delivery, the server can dedicate its full capacity to running WordPress, which is crucial for handling traffic spikes without a drop in performance.

This strategy also provides superior scalability and resilience for future growth. Your media library is no longer constrained by the fixed disk space of your hosting plan. Cloud object storage scales almost infinitely on a pay-for-what-you-use basis, allowing your library to grow from gigabytes to terabytes without complex server migrations.

Getting Started: Your First Step into Media Offloading

It’s certainly possible to offload media manually. You could write custom scripts that hook into WordPress’s wp_handle_upload filter, integrate a cloud provider’s SDK to transfer the file, and then filter wp_get_attachment_url to serve the new URL. This path, however, is fraught with complexity and requires significant development and maintenance time.

A more direct and reliable approach is to use a tool purpose-built for the task, such as WP Offload Media Lite. Getting started is a straightforward, three-step process:

  1. First, you’ll need a destination for your files. This requires an account with your preferred cloud object storage provider, such as Amazon S3, DigitalOcean Spaces, or Google Cloud Storage.
  2. Next, install and activate WP Offload Media Lite on your WordPress site.
  3. Finally, connect the plugin to your storage provider by defining your provider and bucket, adding your access keys to your wp-config.php file for security, and running the setup wizard.

The first stage of setting up WP Offload Media in the WordPress admin.

Once configured, the plugin works transparently in the background. Every new file added to the Media Library is automatically copied to your cloud storage bucket. It’s important to note that WP Offload Media focuses purely on the “offloading” step, not image optimization. For that, we recommend a tool like EWWW Image Optimizer, which integrates with WP Offload Media to compress your images before they are offloaded. By default, the original file also remains on your server, but an option in the plugin settings allows you to automatically delete the local file once it’s successfully in the cloud.

The final step is that the plugin rewrites the file’s URL across your site. This can point directly to the cloud provider, or for even faster global delivery, you can configure a Content Delivery Network (CDN) and have the plugin use your custom CDN domain instead.

This is a powerful first step for any site, as it future-proofs all new content. However, for an established website with a history, this solves only part of the problem. Your existing library, which could contain thousands of images and videos, still resides on and is served by your local server. Addressing this is the critical next step in making your site truly ready for high-traffic events.

Scaling Up: Advanced Strategies for a High-Traffic Reality

Handling future uploads is a critical first step, but to make a site truly resilient to traffic, you must address its entire history. An established site’s local media library represents a significant performance liability. The following strategies move from basic preparation to a complete, professional-grade solution for media management at scale.

Offloading Your Entire Existing Library

The most pressing challenge is migrating the thousands of media files already on your server. A manual migration is not a realistic option. This is where the licensed version of WP Offload Media becomes essential. It includes an Offload Tool specifically designed to tackle this. You simply point it at your library, and it systematically copies every existing file to your cloud bucket without interrupting your live site. It can run in the background, processing your entire library from oldest to newest, ensuring that every single asset is eventually moved off the server.

Achieving 100% CDN Coverage

While the Lite version allows you to serve new uploads via a CDN, the full performance benefit is only realized when every asset on your site is delivered with the same global speed. The licensed version’s migration tool makes this possible. Once your entire library is offloaded, every image is then served through your configured CDN. This provides a consistent and fast experience for all users across all content and is the key to a truly scalable delivery architecture.

Full Control Over Storage and Workflow

Once your entire library is offloaded, you can fully reclaim your server’s resources, freeingup gigabytes of disk space. This not only optimizes server performance but can also significantly reduce hosting costs.

Crucially, this does not mean losing control. All of your offloaded media remains fully manageable from the familiar WordPress Media Library. You can browse, search, and even download files back to your server or copy them to a different cloud bucket, all from within the WordPress admin. Your workflow remains the same, even though your files are now served from a highly scalable, external infrastructure.

Beyond Offloading: Other Essential Media Strategies

Offloading provides the architectural foundation for a scalable media strategy, but true optimization also happens at the asset level. A 5 MB image served from a lightning-fast CDN is still a 5 MB image that the user has to download. Combining your offloading architecture with the following best practices will ensure your site is as lean and fast as possible.

Compress and Resize Before Offloading

It’s critical that images are properly sized and compressed before they are copied to your cloud storage. Sending a 4000px-wide image to be displayed in a 800px container is a significant waste of bandwidth. As we mentioned earlier, a dedicated image optimization plugin like EWWW Image Optimizer should be part of your stack. These tools can automatically resize uploads to sensible maximum dimensions and apply powerful compression, integrating with WP Offload Media to ensure only optimized files are sent to the cloud.

Serve Next-Gen Image Formats

Modern image formats like WebP can provide significantly better compression than traditional JPEGs and PNGs, resulting in smaller file sizes at the same visual quality. Many image optimization plugins can automatically create WebP versions of your uploads and transparently serve them to supported browsers, while providing the original format as a fallback. This is a purely additive improvement that reduces bandwidth with no downside.

Implement Lazy Loading

Lazy loading defers the loading of off-screen images and iframes until the user actually scrolls them into the viewport. This dramatically improves the initial perceived performance of a page, as the browser doesn’t have to download every single image at once. While WordPress has included basic native lazy loading since version 5.5, dedicated plugins often provide more granular control over thresholds, animations, and excluding specific images from the behavior. For media-heavy pages, this is more of a necessity than an optimization.

Wrapping Up

Ultimately, a server’s performance under load is dictated by its architecture. A standard WordPress installation that co-locates the application and its heavy media assets is inherently vulnerable during traffic spikes, regardless of the raw power of the hosting plan.

By decoupling the application from asset delivery through media offloading, you solve the primary bottleneck at its source. When you combine this foundational strategy with the global reach of a CDN and diligent asset-level optimizations like compression and lazy loading, the result is a truly resilient infrastructure. Preparing your site for high traffic isn’t about bracing for impact; it’s about engineering an architecture where that impact is negligible. You’re no longer just fixing a slow website, but building for the success you’re working to achieve.

Which other tools do you use to optimize how your WordPress sites store and serve images? Let us know in the comments!

The post Preparing Your WordPress Site for High-Traffic: Media Optimization Strategies appeared first on Delicious Brains.

Minimizing DNS Propagation Issues With a Reverse Proxy

4 November 2025 at 14:50

Migrating servers is a complex process that involves many moving parts. One of the most challenging aspects of server migration is dealing with DNS propagation. When you update your DNS records to point to a new server, it can take several hours for the changes to propagate globally. During this time, some users may still be directed to the old server, which can lead to issues with data consistency, ordering, and revenue loss.

A reverse proxy can help mitigate these issues by allowing you to control the exact moment when the new server starts serving all requests to your domain. In this article, we’ll explore how to set up a reverse proxy using Nginx or Apache, and discuss some additional considerations and alternatives.

What is a Reverse Proxy?

A reverse proxy is a server that receives requests from the internet, obtains the requested resource from the server it’s acting as a proxy for, and then returns that resource to the requester. This is different from a forward proxy, which is typically used to cache frequently requested resources or hide internal IP addresses.

You may have already used a reverse proxy in your setup, for example, by installing Nginx in front of Apache to take advantage of Nginx’s speed and caching capabilities.

How Can a Reverse Proxy Help with DNS Propagation?

A reverse proxy can’t speed up DNS propagation, but it can help mitigate the issues associated with waiting for it to happen. When you’re migrating a server, you can set up the old server as a reverse proxy for the new server. This way, even though some users may still be directed to the old server, the reverse proxy will ensure that all requests are served by the new server.

For example, suppose you’re moving a client’s eCommerce site from an old server to a new server at a different provider. You’ve set up everything on the new server and are ready to switch over the DNS. However, you realize that some users may still be directed to the old server until their local DNS cache is updated. By setting up the old server as a reverse proxy for the new server, you can ensure that all requests are served by the new server, even if some users are still being directed to the old server.

Proactively Shortening DNS Time-to-Live

While a reverse proxy mitigates the problem, you can proactively minimize the duration of the propagation window by adjusting your DNS Time-to-Live (TTL) settings.

The TTL is a value (usually measured in seconds) that tells recursive DNS servers and client machines how long to cache your domain’s IP address before requesting an update. Common TTL values range from 3600 seconds (1 hour) to 86400 seconds (24 hours).

To prepare for a migration:

  1. Reduce the TTL: At least 24 hours before the migration, log into your DNS registrar or host and reduce the TTL for your A records to a very short value, such as 300 seconds or even 60 seconds.
  2. Wait for the Old TTL to Expire: You must wait for your original, longer TTL to expire (e.g., if your old TTL was 24 hours, wait 24 hours) to ensure the low value has been cached everywhere.
  3. Perform the Migration: Once the TTL is low, any DNS change you make will propagate and take effect much faster, minimizing the overlap time where users might be hitting the old server.
  4. Restore the TTL: After the migration is complete and you are confident all traffic is hitting the new server, you can restore the TTL to a longer, more typical value (like 3600 seconds) to reduce load on your authoritative DNS servers.

By reducing the TTL, you drastically reduce the period during which a reverse proxy is necessary, making your migration cleaner and faster.

Check Your Host’s Recommendations

Your hosting provider may have specific recommendations and policies regarding reverse proxies. WP Engine, for example, generally doesn’t recommend using reverse proxies. There are certain situations where they support it, but it requires some additional configuration.

WP Engine already utilizes reverse proxy technology in their server setup, with Nginx serving as a traffic director and CDN services distributing static files globally. If you still need to use a reverse proxy, WP Engine recommends forwarding real IP addresses to ensure accurate identification of users and prevent potential security issues.

WP Engine allows two primary proxy configurations: hosting only a subdirectory and hosting both a subdirectory and top-level domain. Each of these has specific configuration instructions.

In addition to your host’s recommendations, there are some other things you should consider before going down this route. Using a reverse proxy can introduce additional latency and resource usage. Make sure to monitor your server’s performance and adjust your configuration accordingly. In addition, the reverse proxy will not proxy database connections, so you’ll need to update your database connection settings to point to the new server.

Using a reverse proxy introduces several security risks. It can become a single point of failure, and if not properly configured, it can expose vulnerabilities. Reverse proxies can store sensitive information like IP addresses and passwords, which can be problematic if managed by a malicious party. Additionally, they are susceptible to HTTP request smuggling attacks and can disrupt operations if they fail. Proper setup and ongoing management are crucial to mitigate these risks effectively.

Configuration and Security Planning

Before modifying any server configurations, it’s vital to address potential security and conflict issues that arise when using a reverse proxy.

  • Prevent Configuration Conflicts: On the old server (the proxy), ensure your new proxy rules don’t conflict with existing virtual hosts or default server blocks. You may need to disable the original virtual host that was serving the website files. If you’re using Nginx, this often means removing or renaming the site’s configuration file from /etc/nginx/sites-enabled/. In Apache, you’ll use sudo a2dissite mydomain.com.conf. This guarantees that the server processes traffic using only the new proxy configuration.

  • Secure Sensitive Files: The configuration steps require placing your SSL certificate and private key files on the old server (the proxy). While necessary for HTTPS traffic, ensure these files are stored outside of any publicly accessible web directory and protected with strict file permissions (e.g., owned by root, read-only by the web server user) to prevent unauthorized access.

  • Avoid Caching Issues: If the old server (proxy) uses any form of server-side caching (like Varnish or a built-in Nginx/Apache cache), you must ensure these caches are disabled or bypassed for the proxy traffic. If the proxy serves a cached page instead of forwarding the request to the new server, your efforts to ensure data consistency will fail.

Addressing these issues ensures that your migration is not only seamless for the user but also secure and stable during the entire DNS propagation window.

Setting up the Reverse Proxy

The original version of this article only included instructions for setting up a reverse proxy with Apache. We’ve updated those instructions, and added the process for using Nginx. You can skip to the Apache process here.

Setting up a Reverse Proxy Using Nginx

Create a new file in the /etc/nginx/conf.d/ directory, such as my-proxy.conf. This file will contain the configuration for your reverse proxy.

sudo nano /etc/nginx/conf.d/my-proxy

In the my-proxy file, add the following configuration for both HTTP and HTTPS traffic:

server {
    listen 80;
    server_name mydomain.com www.mydomain.com;

    error_log /var/log/nginx/proxy-error.log crit;
    access_log /var/log/nginx/proxy-access.log combined;

    location / {
        proxy_pass http://new-server-ip-address:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
    }
}

server {
    listen 443 ssl;
    server_name mydomain.com www.mydomain.com;

    error_log /var/log/nginx/proxy-error.log crit;
    access_log /var/log/nginx/proxy-access.log combined;

    ssl_certificate /path/to/your/certificate.crt;
    ssl_certificate_key /path/to/your/private.key;

    location / {
        proxy_pass https://new-server-ip-address:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
    }
}

Replace mydomain.com with your site’s domain name, new-server-ip-address with the IP address of your new server, and update the paths to your SSL certificate and private key files. Finally, restart Nginx to apply the new configuration:

sudo service nginx restart

Nginx Considerations

There are a couple of things you should keep in mind when setting up a reverse proxy with Nginx:

  • Proxy Caching: Nginx has built-in support for proxy caching, which can help reduce the load on your origin server. You can enable proxy caching by adding the proxy_cache directive to your configuration.

  • Buffering: Nginx can buffer responses from the origin server, which can help improve performance. You can enable buffering by adding the proxy_buffering directive to your configuration.

Setting up a Reverse Proxy Using Apache

To set up a reverse proxy using Apache, you’ll need to enable the proxy_http and ssl modules, and create a new virtual host configuration file. Here’s an example of how to do this on Ubuntu 22.04:

sudo a2enmod proxy proxy_http ssl
sudo nano /etc/apache2/sites-available/my-proxy.conf

In the my-proxy.conf file, add the following configuration:

<VirtualHost *:443>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    ErrorLog ${APACHE_LOG_DIR}/proxy-error.log
    CustomLog ${APACHE_LOG_DIR}/proxy-access.log combined

    SSLEngine on
    SSLCertificateFile /path/to/your/certificate.crt
    SSLCertificateKeyFile /path/to/your/private.key

    ProxyRequests Off
    ProxyPass / https://new-server-ip-address:8080/
    ProxyPassReverse / https://new-server-ip-address:8080/
    ProxySet Header Host $host
    ProxySet Header X-Real-IP $remote_addr
    ProxySet Header X-Forwarded-For $remote_addr
</VirtualHost>

Replace mydomain.com with your site’s domain name, new-server-ip-address with the IP address of your new server, and update the paths to your SSL certificate and private key files.

To enable the new configuration, run the following command:

sudo a2ensite my-proxy

Finally, restart Apache to apply the new configuration:

sudo service apache2 restart

Apache Considerations

There are a few things you should keep in mind when setting up a reverse proxy with Apache:

  • SSL Configuration: Make sure to update the SSLCertificateFile and SSLCertificateKeyFile directives to match the paths to your SSL certificate and private key files.
  • Server Aliases: Update the ServerName and ServerAlias directives to match your site’s domain name.
  • Proxy Settings: Consider using a more secure way to store your SSL certificate and private key files, such as using a password-protected file or a secure keyring.

Configuring WordPress to Recognize the Real IP

While your reverse proxy is now configured to correctly forward the client’s real IP address using the X-Real-IP or X-Forwarded-For headers, WordPress does not automatically recognize these. By default, WordPress only reads the REMOTE_ADDR server variable, which now contains the IP address of the old server.

To ensure WordPress properly logs, analyzes, and enforces security rules based on the true client IP, you must add a small snippet to your wp-config.php file on the new server.

Place the following code snippet above the line that says /* That's all, stop editing!

<?php
// Set the client's real IP address when behind a reverse proxy
if (isset($_SERVER['HTTP_X_REAL_IP'])) {
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
    // The first IP is the actual client IP
    $_SERVER['REMOTE_ADDR'] = trim($ips[0]);
}
?>

Wrapping Up

Using a reverse proxy can be a useful tool for mitigating the issues associated with DNS propagation, but it requires careful planning and configuration to ensure that it is implemented correctly. Make sure to look into your host’s recommendations before you begin, and be aware that there are security risks that come with implementing a reverse proxy.

A reverse proxy can be an incredibly powerful tool for routing traffic around and through tough situations, but there’s always more than one way to do it. What are your best tips for migrating servers or creative uses of the reverse proxy? Let us know in the comments!

The post Minimizing DNS Propagation Issues With a Reverse Proxy appeared first on Delicious Brains.

❌
❌