❌

Normal view

There are new articles available, click to refresh the page.
Before yesterdayDelicious Brains

Delicious Brain Bytes: WordPress Market Share Declines, State of the Community Survey, and Building an Admin Copilot

8 June 2026 at 20:22

In this issue of Delicious Brain Bytes, we look at the recent WordPress® market share decline, dive into Brian Gardner’s perspective on WordPress 7.0 as a design-focused operating system for the intelligent web, check the pulse of the ecosystem with the WP Community Collective’s State of the Community survey, and much more!

Unpacking the WordPress Market Share Decline

The WordPress community has been abuzz with recent data showing a contraction in its once-untouchable market dominance. According to the latest data from W3Techs, WordPress currently powers 59.4% of all websites with a known content management system, which translates to roughly 41.9% of all websites on the internet. While those numbers still represent a massive amount of sites, the trajectory has raised eyebrows across the industry.

As reported in a detailed analysis by Search Engine Journal, WordPress is facing its first sustained, multi-quarter decline in recent history. While a minor drop in 2025 was easily dismissed, the pace of the decline seems to have picked up.

“WordPress market share stood at 43.20% in December 2025 and declined to 41.90% by May 27, 2026. That’s a drop of 1.3 percentage points in six months, double what it was for the entire year of 2025,” writes Roger Monti on Search Engine Journal. “That’s a drop of 1.3 percentage points in six months, double what it was for the entire year of 2025.”

Where are these users going? While WordPress has dipped, closed-ecosystem competitors and modern developer frameworks are steadily scooping up the crumbs. Over the same timeline, platforms like Wix (+0.6), Shopify (+0.4), and Squarespace (+0.2) have seen modest gains.

WordPress Core Calls: Test Client-Side Media and Join the 7.0.x Release Squad

The WordPress core team has issued a call for testing client-side media processing, a progressive enhancement targeting WordPress 7.1 as a core capability. Rather than depending solely on server-side image processing pipelines, this feature offloads the decoding, resizing, and encoding of images directly to the user’s browser using WebAssembly. It provides a uniform, high-quality experience across different hosting environments while supporting advanced formats like AVIF, WebP, HEIC, UltraHDR, and JPEG XL without bloating initial bundle sizes. Testing across diverse devices is highly encouraged to smoke out bugs and stress-test upload resilience paths before the 7.1 cycle accelerates.

There’s also an open call for WordPress 7.0.x release managers to steer minor maintenance versions. This lean squad will be responsible for triaging bugs, drafting announcements, and running release operations, beginning with the tentative rollout of WordPress 7.0.1 later in June.

State of the Community Survey Now Open

The WP Community Collective has launched its State of the Community survey, an anonymous initiative inviting anyone who works with, contributes to, or cares about the WordPress open source project to share their perspectives.

Open from May 27 through June 28, 2026, the survey takes 10 to 20 minutes to complete and aims to capture a comprehensive snapshot of ecosystem health and participant trajectories.

Rather than just collecting basic demographics and professional background, the 10-to-20 minute questionnaire gathers broad feedback on project sentiment, community and event participation, core open-source values, and the shifting impacts of artificial intelligence.

All responses are completely anonymous and will be used to better understand the collective state of the project. To make your voice heard, head over to the WPCC and share your feedback before the June 28 deadline.

WordPress 7.0: A Design-Focused Operating System for the Intelligent Web

Brian Gardner of WP Engine recently shared a deep-dive perspective on the release of WordPress 7.0. Gardner notes that for twenty years, building great digital experiences often felt like a series of compromises between creative vision and software limitations. With the arrival of version 7.0, however, he believes the core software has officially matured into a sophisticated, future-ready operating system.

In the article, he explores in depth how the release transitions the CMS into an AI-ready, design-focused operating system by introducing a native AI framework, utilizing the Connectors API and WP AI Client SDK, alongside core enhancements like customizable navigation overlays, “content-only” pattern editing, and responsive block visibility.

Read the [full breakdown] (https://wpengine.com/blog/wordpress-7-0-release/) and see how these guardrails, performance updates, and media optimizations are helping to prepare your sites for the next era of web development.

Build a WordPress Admin Copilot with OpenAI and Smart Search AI MCP

“Find the right post quickly” sounds simple, but becomes more challenging as your content library grows. In an ideal world, you’d be able to search your indexed content with natural language, return results in real time, and handle follow-up requests like “show more” and “summarize the first result.”

In this tutorial, Fran Agulto shows us how to build a WordPress admin copilot that does just that, using a Next.js API backend as the coordinator, OpenAI for reasoning and tool orchestration, and WP Engine Smart Search AI MCP for deterministic search and retrieval.

YouTube cover image

Managing Third-Party API Bottlenecks in WordPress

No WordPress site is an island. Sites routinely integrate with external CRMs, enterprise ERP systems, inventory managers, payment gateways, and fulfillment APIs. These integrations add value, but they also introduce architectural vulnerability.

Any given third-party service might go down and cause a specific feature to stop working, but the bigger risk is a cascade failure. If an external API experiences latency or drops offline entirely, a poorly isolated WordPress site will go down with it.

Your server won’t crash because your database failed or because you ran out of memory. It will crash because your server’s PHP-FPM workers are stuck waiting in a synchronous queue for a response that isn’t coming.

In this article, we discuss defensive code isolation, and how to decouple your site’s frontend uptime from the reliability of your third-party dependencies.

What’s the most interesting news you’ve come across recently? Pop by the site formerly known as Twitter and let us know.

The post Delicious Brain Bytes: WordPress Market Share Declines, State of the Community Survey, and Building an Admin Copilot appeared first on Delicious Brains.

Environment Variables vs. Database: Securing the Connectors API

1 June 2026 at 16:22

With the launch of WordPress 7.0, the platform has undergone one of its most significant architectural evolutions in years. Instead of treating artificial intelligence as a collection of disjointed features to bolt on, Core now includes a standardized, native infrastructure layer.

At the center of this is the Connectors API, a centralized, native registry in WordPress 7.0 that allows you to manage your external service credentials in one place instead of forcing you to configure them across multiple separate plugins. As Greg Ziółkowski writes in the Make WordPress post linked above, “The initial focus is on AI providers, giving WordPress a standardized way to handle API key management, provider discovery, and admin UI for configuring AI services.”

While this solves a massive headache, it also introduces new questions about where and how you should stash your secrets.

Saving your keys via the dashboard is convenient, but storing scalable, high-cost AI credentials as plain text in a centralized database table has its downsides. An AI API key can essentially serve as a blank check tied to an open-ended billing account. If an attacker extracts it via the database, the financial liability could be massive. In this article, we explore why shifting your credentials to environment variables is a more secure choice.

Centralized Secrets

Before WordPress 7.0, a site using three different AI-powered plugins required pasting API keys into three entirely different settings screens. This method resulted in fragmented credential storage, messy rate-limiting, and unpredictable security risks.

WordPress 7.0 fixes this by decoupling the core infrastructure from the specific service providers.

  • Core Infrastructure: WordPress Core now provides the unified registry layer and the native API endpoints.
  • Companion Plugins: Individual service connections (like OpenAI, Anthropic, or Google) are managed by official companion plugins that register in the Core ecosystem.

The result is a centralized hub located at Settings → Connectors. While this unification provides seamless configuration, it means that a single point of entry now holds the keys to your entire external application ecosystem.

A screenshot of the "Connectors" screen in WordPress 7.0.

Understanding the Authentication Hierarchy

Securing this architecture requires looking at how WordPress evaluates credentials. The Connectors API uses a strict, three-step waterfall logic to check for API keys:

  1. Environment Variables (Highest priority)
  2. PHP Constants (e.g., define( 'OPENAI_API_KEY', 'sk-...' ); inside wp-config.php)
  3. Database Options (Values submitted through the Settings → Connectors UI)
[System Request] 
       │
       ▼
 1. Environment Variables ───► Key Found? ───► [Authenticate]
       │ (Bypasses DB)
       ▼ Key Empty
 2. PHP Constants         ───► Key Found? ───► [Authenticate]
       │
       ▼ Key Empty
 3. Database Storage      ───► Pulls Plain Text from wp_options

Defining your secrets at the server level with environment variables automatically short-circuit this evaluation chain. WordPress never triggers the database lookup for the key, reducing query load and keeping your raw credentials completely decoupled from the database layer.

“Masked” Does Not Mean “Secure”

If you input an API key into the WordPress admin interface, the screen will gracefully mask the characters with bullet points or asterisks. However, masked does not mean encrypted.

Under the hood, WordPress stores these credentials as raw, plain-text strings inside the wp_options table. Because of this storage model, your site’s external accounts are exposed to several common vectors:

  • SQL Injection (SQLi): If an unpatched plugin introduces an SQLi flaw anywhere on your site, an attacker can read the raw contents of the wp_options table and extract your production API keys.
  • Database Export Exposure: Unauthorized database dumps, poorly secured staging environments, or unencrypted backups left in public directories immediately compromise your external billing accounts.
NOTE: The WordPress community recognizes this plain-text limitation. Core ticket #64789 is actively tracking proposals to introduce native database encryption for sensitive stored options in future releases.

Database Cleansing and Syncing with WP Migrate

When transitioning from database storage to server-level environment variables, you must ensure that your deployment tools don’t accidentally leak production keys downward to local environments.

The Connectors API uses a standardized naming schema for options stored in the database:

connectors_{$provider_type}_{$provider_id}_api_key

Because these options use a predictable prefix, configuring your synchronization tools is straightforward.

Preserving Environment Boundaries

When pushing or pulling databases with WP Migrate, you must prevent sensitive credentials from migrating between environments. Use the wpmdb_preserved_options filter to ensure that local or staging variables are never overwritten by a production database pull:

add_filter( 'wpmdb_preserved_options', function( $options ) {
    // The provider type group in WP 7.0 is 'ai'
    $options[] = 'connectors_ai_openai_api_key';
    $options[] = 'connectors_ai_anthropic_api_key';
    return $options;
});

Database Sanitization

Once you have successfully declared your keys as environment variables at the system level, your site immediately switches to them, rendering the database values obsolete. At this point, you can use WP Migrate’s find-and-replace feature to search your wp_options table for the connectors_ string prefix and safely delete those obsolete records.

Wrapping Up

The Connectors API in WordPress 7.0 is a phenomenal structural step forward for the ecosystem, turning the CMS into a highly capable platform for integrated AI capabilities. However, a framework is only as secure as its implementation.

Relying on default database storage exposes your critical external integration credentials to unnecessary vulnerabilities. By embracing the authentication hierarchy and prioritizing server-level environment variables, you harden your infrastructure and protect your operational budgets.

The post Environment Variables vs. Database: Securing the Connectors API appeared first on Delicious Brains.

Managing Third-Party API Bottlenecks in WordPress

18 May 2026 at 16:52

No WordPress® site is an island. Sites routinely integrate with external CRMs, enterprise ERP systems, inventory managers, payment gateways, and fulfillment APIs. These integrations add value, but they also introduce architectural vulnerability.

The danger isn’t just that a third-party service might go down and cause a specific feature to stop working. The real risk is a cascade failure. If an external API experiences latency or drops offline entirely, a poorly isolated WordPress site will go down with it.

Your server won’t crash because your database failed or because you ran out of memory. It will crash because your server’s PHP-FPM workers are stuck waiting in a synchronous queue for a response that isn’t coming.

A truly resilient site uses defensive code isolation. Here is how to decouple your site’s frontend uptime from the reliability of your third-party dependencies.

The Anatomy of a PHP Worker Hang

When an external service drops or slows down to a crawl under heavy load, many developers assume the impact is isolated to that specific function. They believe that if the shipping calculator API is slow, only the checkout page will lag.

To understand why this is a dangerous misconception, we have to look under the hood at how PHP and your server handle incoming traffic.

By default, HTTP requests executed via WordPress core functions like wp_remote_get() or wp_remote_request() are synchronous and blocking. PHP is inherently single-threaded. When a worker process executes a blocking HTTP request, it halts execution entirely and sits idle, waiting for the external server to reply.

[Incoming Request] ➔ [PHP-FPM Worker Assigned] ➔ [Executes wp_remote_get()] ➔ [Worker Halted / Waiting for API]

Most production servers run a process manager like PHP-FPM with a finite pool of workers (for example, 20 to 50 concurrent workers depending on your server configuration). If your site experiences a sudden surge in traffic and 20 concurrent users hit a page that triggers a slow third-party API call, your entire worker pool can be exhausted instantly.

At this point, your server is maxed out. The 21st visitor will be placed in a queue, even if they are just trying to load a completely static, text-only homepage that doesn’t use the API. When the queue fills up, Nginx or Apache will throw a 502 Bad Gateway or 504 Gateway Timeout error. A slow API endpoint on a single deep page has successfully brought down your entire network.

The Transient Trap and Cache Stampedes

A common first-line defense against API bottlenecks is caching the external response using the WordPress Transients API. By wrapping your request in get_transient() and set_transient(), you ensure your server only hits the external API once every hour or day, rather than on every page load.

While caching is mandatory, relying solely on standard transients under high traffic creates a severe vulnerability known as a “cache stampede.”

Consider a high-traffic eCommerce store where an API transient expires. At that exact millisecond, 50 concurrent users land on the site. Because get_transient() returns false for all 50 workers simultaneously, every single one of those workers will independently execute wp_remote_get() to refresh the cache.

Instead of protecting the external API and your local server, you have just generated a massive, synchronized spike in outbound requests! If the third-party API responds slowly during this stampede, your worker pool instantly locks up, and the site crashes.

How to Prevent the Stampede: Transient Locking

To solve the cache stampede, we need to introduce a transient lock.

When the main cache expires, the very first PHP worker that notices the missing data will immediately set a temporary ‘lock’ transient (e.g., for 30 seconds). When the other 49 concurrent workers check the cache and see that it is empty, they will also see the lock. This tells them, “Someone else is already fetching the data!” Instead of piling onto the external API, those 49 workers will instantly return your fallback data, completely neutralizing the stampede.

function fetch_api_data_with_lock() {
    $cache_key = 'external_api_data';
    $lock_key  = 'external_api_data_lock';

    // 1. Try to get the cached data
    $cached_data = get_transient( $cache_key );
    if ( false !== $cached_data ) {
        return $cached_data; // Cache hit! Return immediately.
    }

    // 2. Cache is empty. Check if another worker is already fetching it.
    if ( get_transient( $lock_key ) ) {
        // The lock exists. Another process is currently hitting the API.
        // Return fallback data to prevent a stampede.
        return get_fallback_api_data();
    }

    // 3. No lock exists. Set the lock immediately for 30 seconds!
    set_transient( $lock_key, true, 30 );

    // 4. Safely fetch the data
    $response = wp_remote_get( 'https://api.external-service.com/v1/data', [
        'timeout' => 1.5,
    ] );

    // Handle failure
    if ( is_wp_error( $response ) ) {
        delete_transient( $lock_key ); // Clear lock so we can try again sooner
        return get_fallback_api_data();
    }

    $body = wp_remote_retrieve_body( $response );
    $data = json_decode( $body, true );

    // 5. Success! Save the actual data for 1 hour and remove the lock.
    if ( $data ) {
         set_transient( $cache_key, $data, HOUR_IN_SECONDS );
    }
    delete_transient( $lock_key );

    return $data;
}

Defensive Routing: Tuning Your HTTP Requests

The first rule of defensive engineering is to never accept default configuration values blindly. By default, WordPress sets a 5-second timeout on HTTP requests made via wp_remote_get(). Five seconds is an eternity. If a worker hangs for 5 seconds on a high-traffic site, resource exhaustion is virtually guaranteed.

When communicating with external APIs on the frontend, you must lower your timeouts aggressively and handle the resulting errors gracefully using is_wp_error().

Here is how you can set up a defensive wrapper for an API call:

function fetch_defensive_api_data() {
    $url = 'https://api.external-service.com/v1/data';

    // Step 1: Lower timeouts aggressively
    $response = wp_remote_get( $url, [
        'timeout'   => 1.5, // 1.5 seconds max before failing fast
        'sslverify' => true,
    ] );

    // Step 2: Catch timeouts or network failures gracefully
    if ( is_wp_error( $response ) ) {
        // Log the error for internal auditing
        error_log( 'API Failure: ' . $response->get_error_message() );

        // Return fallback data instead of breaking the execution
        return get_fallback_api_data();
    }

    $body = wp_remote_retrieve_body( $response );
    return json_decode( $body, true );
}

function get_fallback_api_data() {
    // Provide safe, stale, or static default data to keep the UI intact
    return [
        'status' => 'offline',
        'items'  => [],
    ];
}

By reducing the timeout to 1.5 seconds, you guarantee that a failing API can only hold a PHP worker hostage for a brief moment, giving your server a fighting chance to recycle that worker and serve the next request.

Implementing the Circuit Breaker Pattern

Lowering timeouts protects your worker pool from long hangs, but it doesn’t stop your server from continuously hammering a broken or offline API. If an external service goes down for an hour, your server will still spend 1.5 seconds on every single page load trying to reach it.

To solve this, we can borrow a classic microservice architecture strategy: The Circuit Breaker Pattern.

The concept is straightforward:

  1. Closed Circuit: The API is functioning normally; requests flow through.
  2. Open Circuit (Tripped): The API has failed multiple times in a row. The circuit “trips,” and your code stops attempting to call the remote API entirely. It immediately returns fallback data without wasting server resources.
  3. Half-Open: After a cool-down period, the circuit allows a single request through to test if the external service has recovered.

We can implement a lightweight, highly effective circuit breaker natively in WordPress using the Object Cache or Transients API:

function fetch_api_with_circuit_breaker() {
    $circuit_status_key  = 'api_circuit_breaker_tripped';
    $failure_counter_key = 'api_failure_counter';

    // 1. Closed or Open? Check if the circuit is currently "Open" (Tripped)
    if ( get_transient( $circuit_status_key ) ) {
        // Circuit is open; fail fast immediately and return fallback data
        return get_fallback_api_data();
    }

    // 2. The circuit is Closed (or Half-Open). Attempt the remote request.
    $response = wp_remote_get( 'https://api.external-service.com/v1/data', [
        'timeout' => 1.5,
    ] );

    // 3. Handle a network failure or timeout
    if ( is_wp_error( $response ) ) {
        $failures = (int) get_transient( $failure_counter_key );
        $failures++;

        if ( $failures >= 3 ) {
            // Trip the circuit for 5 minutes. 
            // CRITICAL: We do NOT delete the failure counter here! 
            // We keep it so we can test a "Half-Open" state later.
            set_transient( $circuit_status_key, true, 5 * MINUTE_IN_SECONDS );
        } 

        // Always update the failure count, letting it live longer than the circuit trip time
        set_transient( $failure_counter_key, $failures, 1 * HOUR_IN_SECONDS );

        return get_fallback_api_data();
    }

    // 4. Success! If we get here, the API is healthy.
    // Clear the failure counter to fully reset to a "Closed" state.
    delete_transient( $failure_counter_key );

    $body = wp_remote_retrieve_body( $response );
    return json_decode( $body, true );

    // 5. Validate the payload to ensure it isn't malicious or malformed
    if ( ! is_array( $data ) || empty( $data ) ) {
        return get_fallback_api_data();
    }

    return $data;
}

With this architecture in place, if a third-party partner suffers an outage, your site will only try to talk to them 3 times. On the 3rd failure, the circuit trips. For the next five minutes, your site doesn’t spend a single millisecond waiting on that API, keeping your frontend lightning fast and completely insulated from the outage.

After those five minutes is where the Half-Open state comes in. Notice in the code that we don’t delete the failure counter when the circuit trips; we only delete it on a successful response. After the $circuit_status_key expires, the circuit becomes “Half-Open” and lets one single request through to test the API. If that request fails, the failure counter increments from 3 to 4, immediately tripping the 5-minute circuit again without forcing the server to wait for 3 new failures. If it succeeds, the counter is deleted, and the circuit fully closes.

Mind the Race Condition

The circuit breaker code above relies on get_transient() and set_transient() to count failures. While fine for standard setups, this introduces a race condition on extremely high-traffic sites.

Because transients are not atomic, if 10 users trigger an API timeout at the exact same millisecond, all 10 PHP workers might query the database simultaneously, read the failure count as 0, and all overwrite the count to 1. It might take longer than 3 actual failures to trip the circuit.

If your server runs a persistent object cache like Redis or Memcached, bypass the Transients API for the counter. Instead, use WordPress’s native wp_cache_incr() function. This performs a strictly atomic increment directly in the server’s RAM, guaranteeing perfectly accurate failure counting regardless of concurrent traffic.

Conclusion

Relying on external services is a necessity, but allowing those services to dictate your site’s availability is an architectural choice.

Wrapping HTTP requests in defensive patterns, such as reducing blocking timeouts, planning for transient cache stampedes, and implementing fail-fast circuit breakers. you ensure that a third-party disaster remains an isolated glitch on a specific feature, rather than a catastrophic site-wide crash.

The post Managing Third-Party API Bottlenecks in WordPress appeared first on Delicious Brains.

Beyond `wp_enqueue`: Surgical Asset Management for High-Performance Sites

6 April 2026 at 19:10

A lot of WordPress® plugins follow the path of least resistance. They enqueue their CSS and JavaScript globally to ensure their features “just work” on every page. While this approach is safe for the developer, it’s less than ideal for site performance. Every unused byte of JavaScript adds to the browser’s execution time. This negatively impacts Total Blocking Time (TBT) and Largest Contentful Paint (LCP).

In this guide, we discuss how to move past basic script registration. We will look at how to interrogate the internal WordPress script queue and surgically remove the assets your visitors don’t actually need.

The Baseline: Contextual Loading

The first line of defense is ensuring your own code only loads when necessary. Don’t forget that the wp_enqueue_scripts hook is simply an action. You can wrap your enqueues in logic to restrict them to specific contexts.

Using Conditional Tags prevents scripts from loading where they aren’t needed. For example, if you have a heavy script that only runs on a specific “Contact” page, there’s no point in loading it everywhere else.

add_action( 'wp_enqueue_scripts', function() {
    // Only load the heavy Map script on the Contact page
    if ( is_page( 'contact' ) ) {
        wp_enqueue_script( 'google-maps-api', 'https://maps.googleapis.com/...', array(), null, true );
    }
});

Using is_page(), is_single(), or even has_block() allows you to implement “Just-in-Time” loading. This keeps your initial page weight low.

Peeking Inside the $wp_scripts Global

The real performance bottleneck often comes from third-party plugins. To stop them, you first have to identify their handles. You can spend a big chuck of time hunting through plugin source files if that’s what floats your boat, but it’s probably faster to just look at the internal state of the WordPress script manager.

WordPress uses the WP_Scripts class to manage the queue. During the page lifecycle, a global variable called $wp_scripts holds every registered and enqueued script.

Identifying the Bloat

You can interrogate this global object to see exactly which handles are enqueued for the current request. To use the following snippet, you can add it to a custom plugin used on a staging site or in a local development environment.

It is important to use the wp_print_scripts hook. This hook fires right before WordPress begins printing scripts into the header. This timing ensures that every plugin has finished its enqueuing logic, giving you a complete picture of the final queue.

Run in Local or Staging Environments

You should only run this code in a non-production environment, such as a local install or a staging site.

  • Local vs. Staging: While a local site is “safe,” a staging site is often superior for this audit because it perfectly mirrors your production plugin configuration and database state.

  • Why Not Production? This snippet outputs data directly into your site’s HTML source code. On a live site, this looks unprofessional to visitors and can reveal your specific plugin stack to malicious actors. Additionally, running debug logic on every page load adds unnecessary overhead to your server’s performance.

add_action( 'wp_print_scripts', function() {
    // Only run this if we are logged in as an admin to add an extra layer of privacy
    if ( ! current_user_can( 'manage_options' ) ) {
        return;
    }

    global $wp_scripts;

    // Check if the WP_Scripts class has enqueued handles [cite: 6]
    if ( ! empty( $wp_scripts->queue ) ) {
        // Output the enqueued handles to the browser's JavaScript console
        echo '<script>console.log("Delicious Brains Audit - Enqueued handles: ' . implode( ', ', $wp_scripts->queue ) . '");</script>';
    }
});

By inspecting the queue property of the $wp_scripts object, you can find the exact strings needed to target specific plugin assets.

Programmatic Dequeuing: The Surgical Strike

Once you have identified your target handles, you can use wp_dequeue_script() to remove them. However, success depends a lot on priority.

In WordPress, hook priorities act like a waiting list where a higher number executes later. Since most plugins enqueue assets at the default priority of 10, you should hook into wp_enqueue_scripts with a much higher number (like 100) to ensure your removal logic runs after the plugin’s loading logic.

Example: Pruning Plugin Bloat

Suppose a “Reviews” plugin is loading a 150KB JavaScript file on your homepage. If reviews only exist on your product pages, you can strip that script everywhere else.

add_action( 'wp_enqueue_scripts', function() {
    // If we are on the Home page, remove the Reviews asset
    if ( is_front_page() ) {
        wp_dequeue_script( 'plugin-reviews-js' );
        wp_dequeue_style( 'plugin-reviews-css' );
    }
}, 100 ); // High number = runs later

For aggressive plugins that still manage to load, you can swap to wp_deregister_script(). This is a more permanent “nuclear” option that completely unbinds the handle from its source file for that specific request.

The Dependency Trap

Before you start pulling the plug on every script you see, you must check for dependencies. The wp_enqueue_script() function allows you to define a list of other scripts that must load first.

You’ll break the site’s functionality if you dequeue a script that other enqueued scripts depend on. The browser will throw “not defined” errors in the console. Always check the registered property within the $wp_scripts global to see the dependency array for a specific handle before removing it.

Conclusion

Advanced asset management is a game of subtraction. By auditing the WP_Scripts global and implementing high-priority conditional dequeuing, you can significantly reduce the weight of your frontend. This surgical approach ensures your site stays fast and lean without sacrificing the plugin functionality you need.

The post Beyond `wp_enqueue`: Surgical Asset Management for High-Performance Sites appeared first on Delicious Brains.

The Developer’s Guide to wp_usermeta: Scaling Membership Sites

24 March 2026 at 15:10

In the lifecycle of a membership site, there is a predictable point where the “My Account” page begins to lag and administrative user searches start to time out. Developers can spend hours optimizing wp_postmeta or the wp_posts table, but it’s the wp_usermeta table that is frequently the culprit behind these performance regressions.

As a site scales into tens of thousands of members, the architectural limitations of the WordPress user metadata system become apparent. Understanding how this table handles data—and how it fails—is critical for building a scalable membership platform.

The Architecture of wp_usermeta

Like the post meta and term meta tables, wp_usermeta follows the Entity-Attribute-Value (EAV) model. It is a vertical table designed to store an unlimited variety of data points for any given user.

umeta_id user_id meta_key meta_value
1 50 first_name Jane
2 50 last_name Doe
3 50 membership_level Gold

This flexibility is what makes WordPress powerful. However, this structure becomes expensive at scale. In a membership site with 50,000 users and 20 custom meta fields per user, the wp_usermeta table quickly grows to over a million rows. Every time you query for a user based on a specific attribute, MySQL must navigate this massive dataset.

The Array Trap: Serialized Data and Searchability

One of the most common architectural mistakes in membership site development is storing complex arrays in a single meta value. It is tempting to store all of a user’s “Subscription Preferences” or “Learning Progress” as a serialized array to keep the database row count low.

// The Performance Trap: Storing as an array
$preferences = array( 'email' => true, 'sms' => false, 'tier' => 'premium' );
update_user_meta( $user_id, 'member_preferences', $preferences );

While this works for simple data retrieval, it makes that data functionally invisible to the database for filtering. Because the meta_value column is a longtext field, it is not indexed. If you need to find every user where 'sms' => true inside that serialized array, MySQL cannot use an index. It must perform a “full table scan,” reading every single row in the metadata table and using a LIKE comparison.

On a large site, this pattern is a primary cause of timeout errors. If you need to query or filter by a specific piece of data, it must be stored as its own individual meta key rather than a value inside an array.

Slow Query Patterns in get_users()

When you use get_users() with a meta_query, WordPress performs a JOIN between the wp_users and wp_usermeta tables. This is a standard operation, but the performance cost increases exponentially as the tables grow.

The bottleneck usually occurs because the meta_value column is not indexed. While the meta_key is indexed, any query that checks the content of that key requires the database to scan the values manually.

If your membership site relies on complex filtering, such as finding users who joined after a certain date and have a specific custom role, you are likely triggering expensive queries that bypass the database’s most efficient paths.

Offloading with Persistent Object Caching

The most effective way to prevent wp_usermeta from becoming a bottleneck is to stop hitting the database entirely. This is where persistent object caching (via Redis or Memcached) becomes essential.

In a standard WordPress installation, user data is cached only for the duration of a single page load. A persistent object cache allows WordPress to store the results of user and meta lookups in the server’s RAM across multiple requests.

Persistent object caching ensures that once a user’s metadata is fetched once, it stays in the cache until it is explicitly updated. This is particularly impactful for:

  • Login Processes: Checking user credentials and roles.
  • Member Dashboards: Loading custom “My Account” data.
  • Administrative Searches: Navigating the “Users” screen in the WordPress backend.

By serving this data from RAM rather than the disk, you reduce the Time to First Byte (TTFB) and free up your PHP workers to handle actual visitor traffic instead of redundant database lookups.

Scaling Strategies for Large Sites

If your membership site is approaching 100,000 users, you may need to look beyond the default meta system.

  1. Use Individual Keys: Avoid serialized arrays for any data you intend to use in a filter or search.
  2. Audit Your Autoloaded Options: Be careful with plugins that store unique user data in the wp_options table with the autoload property set to ‘yes’. WordPress fetches every autoloaded option on every page request to populate the object cache. If this collective dataset becomes too large, it can significantly increase memory usage and slow down the initial database handshake. Maintaining a lean options table is a best practice for keeping your object cache healthy and responsive.
  3. Custom Tables: For highly specialized data that requires complex reporting, consider moving that data into a custom SQL table with dedicated indexes. This allows you to architect the schema specifically for your site’s unique query patterns.

A scalable membership site is built on the realization that user data is the most frequently accessed resource on your server. By prioritizing clean data structures and utilizing a persistent caching layer, you can ensure your platform remains performant as your community grows.

The post The Developer’s Guide to wp_usermeta: Scaling Membership Sites appeared first on Delicious Brains.

Scaling the REST API: Defensive Architecture for Custom Endpoints

16 March 2026 at 19:58

The WordPress® REST API is the primary bridge to modern frontend frameworks. However, default endpoints are generic by design. Custom endpoints require precise logic to avoid over-fetching data and exhausting server resources. A poorly architected custom endpoint can become a major performance bottleneck.

Building lean endpoints is essential for respecting the server’s PHP worker pool and memory limits. This ensures your API remains a performance asset rather than a liability. In this article, we examine how to architect high-performance custom endpoints by implementing selective data retrieval, efficient object caching, and network-level security.

How to Architect Lean Responses

One of the most effective ways to optimize an endpoint is to support the native _fields parameter. This allows the client to request only the specific data points it needs. This reduces the size of the JSON payload and the memory required to generate the response.

You should also avoid using standard WP_Query when it is not strictly necessary. WP_Query is a heavy operation that often triggers unnecessary metadata and taxonomy lookups. For surgical data retrieval, using $wpdb directly can significantly reduce memory overhead.

Implementing _fields Support

When registering a custom route, you can implement a filter to prune the response based on the client’s request.

add_action( 'rest_api_init', function () {
    register_rest_route( 'my-plugin/v1', '/data/', array(
        'methods'             => 'GET',
        'callback'            => 'get_custom_data',
        'permission_callback' => '__return_true',
    ) );
} );

function get_custom_data( $request ) {
    $data = array(
        'id'      => 101,
        'name'    => 'Performance Plugin',
        'version' => '2.1.0',
        'author'  => 'Delicious Brains',
    );

    // Check if the _fields parameter is present
    if ( isset( $request['_fields'] ) ) {
        $fields = wp_parse_list( $request['_fields'] );
        $data   = array_intersect_key( $data, array_flip( $fields ) );
    }

    return rest_ensure_response( $data );
}

The Caching Layer: Beyond the Database

You should almost never generate a complex API response on every single request. Using the Transients API allows you to store expensive results in an object cache. This prevents repeated hits to the database and significantly speeds up Time to First Byte (TTFB).

Understanding the Object Cache Layer

In a standard WordPress setup, transients are stored in the wp_options table. This means every time you fetch a transient, WordPress still has to perform a database query. An object cache layer changes this by storing that data in the server’s RAM instead of on the disk.

Keeping frequently accessed data in memory reduces the time it takes to access the database and keeps your server healthier by saving it from searching for the same information repeatedly.

Setting Up Your Own Caching Layer

If your hosting provider does not offer a managed solution, you can implement one yourself. The process generally involves two main components:

  1. Installing a Persistent Data Store: You will need to install a tool like Redis or Memcached on your server. These are specialized systems designed for high-speed, in-memory data storage.
  2. Connecting WordPress: Once the store is running, you need an object cache drop-in. This is a specialized PHP file (object-cache.php) placed in your wp-content folder that tells WordPress to route set_transient and get_transient calls to your new data store instead of the database.

Caching with Managed Hosting

Your host may already include solutions for this that require no manual configuration. If you are hosting with WP Engine, the object cache layer is enabled by default on all new environments. It can also be toggled manually within the WP Engine User Portal.

When using this managed layer, you must be mindful of the 1MB buffer size limit. Because the object cache stores data as a single long row, an oversized API response can cause the cache to reject the request. This can lead to a loop of failed requests and 502 Bad Gateway errors. To maintain a healthy environment, aim to keep your cached payloads under 800,000 bytes.

Security: Protecting the Gateway

A custom endpoint is a gateway into your database. It must be built with both a lock and a filter. Every route should include a permission_callback to ensure the requester is authorized to access the data.

You must also use validate_callback and sanitize_callback for every input argument. These functions protect your site against SQL injection and malformed data. For state-changing requests like POST or DELETE, ensure you are properly handling nonces or authentication headers to prevent unauthorized access.

Infrastructure Defense: Rate Limiting and Edge Security

Even a secure endpoint is vulnerable to API hammering. This is a scenario where an external script, bot, or malicious actor targets your custom endpoint with a high volume of requests. Because custom REST API requests are often uncacheable and resource-intensive, they can quickly exhaust your site’s PHP worker pool. This saturation prevents legitimate visitors from accessing the site, effectively resulting in a denial-of-service state.

To protect your server resources, you should look for security solutions that operate at the network edge rather than within WordPress itself.

Why Edge Security Matters

Traditional WordPress security plugins run as part of the application. This means every malicious request still has to be processed by your server before the plugin can block it. In contrast, edge security sits in front of your hosting environment. It acts as a high-performance barrier that filters traffic before it ever touches your WordPress install.

A robust edge strategy includes several key components:

  • Web Application Firewall (WAF): A WAF uses a set of rules to identify and block common exploits, such as SQL injection or cross-site scripting, at the network level.
  • DDoS Protection: High-capacity networks can absorb and mitigate large-scale distributed denial-of-service attacks that would otherwise overwhelm a single server.
  • Network-Level Rate Limiting: By identifying high-frequency requests from specific IP addresses, the edge layer can block API hammering before it reaches your PHP workers.

Strategic Implementations

If you are managing your own infrastructure, you can implement these protections using services like Cloudflare or specialized Nginx configurations. These tools allow you to set strict limits on how often a specific user or bot can hit your /wp-json/ endpoints.

Your host may include these protections as part of their service. For example, WP Engine offers Global Edge Security (GES). This managed solution leverages a global network to provide WAF protection and DDoS mitigation. Server resources are preserved for your actual users while malicious traffic is discarded at the edge.

Conclusion

Responsible API requests consider the health of the entire ecosystem, from the client’s data needs to the server’s available memory. Throughout this guide, we have explored how to move beyond basic endpoint registration toward a more defensive and performant architecture.

By implementing the _fields parameter and avoiding the overhead of standard WP_Query wrappers, you can ensure that your payloads remain lean and fast. We have also seen how the addition of an object cache layer is critical for preventing redundant database queries. Moving frequent lookups into memory reduces the strain on your database and improves response times across the board.

Finally, we discussed why securing the gateway to your database requires more than just code-level sanitization. True infrastructure defense involves shifting the burden of malicious traffic away from your PHP workers and toward the network edge. Combining these code-level optimizations with network-level rate limiting and WAF protection creates a robust system capable of handling high-traffic demands. This comprehensive approach ensures that your WordPress site remains stable, secure, and ready to scale.

The post Scaling the REST API: Defensive Architecture for Custom Endpoints appeared first on Delicious Brains.

Delicious Brain Bytes: Code Redefined, “Clippy” for WordPress, and Customizing Publication Checklists

9 March 2026 at 19:42

In this issue of Delicious Brain Bytes, we explore the human side of innovation in the Crafted with Code showcase, test-drive a nostalgic Clippy-style assistant in the WordPress® dashboard, and dive into WordPress.org’s new native Markdown support for AI agents. Plus, we check the pulse of the industry with the Admin Bar’s 2026 WordPress Professionals Survey, navigate changes in the FAIR project, and much more!

Crafted with Code: Where Tech Meets Human Judgment

The latest installment of the Crafted with Code series, Code Redefined: The Edge of Innovation, explores the intersection of purposeful technology and human judgment. In its sixth year, this showcase by WP Engine and the Webby Awards highlights that 30% of all Webby-recognized sites were built on WordPress®. This year’s “Code Redefined” theme explores how intelligence is embedded with intention across three standout projects:

  • Mozilla Builders (by Upstatement): Creating a digital home for the open-source AI community. By leveraging WordPress and WP Engine, the team built a site capable of handling massive traffic spikes while establishing Mozilla as a leader in the AI renaissance.
  • Farm Africa (by The Web Kitchen): Moving away from traditional charity tropes toward an energetic brand narrative. The modular block-based system helped drive a staggering 94% increase in online donations.
  • Skidmore, Owings & Merrill (by Code and Theory): A masterclass in performance for one of the world’s top architecture firms. The site manages a massive library of high-resolution architectural photography without sacrificing speed or stability.

Innovation in the AI era isn’t just about the tech you use, but the human choices that solve real-world challenges.

You can watch the full Crafted with Code playlist to see the behind-the-scenes stories of these award-winning builds.

Industry Pulse: The Admin Bar Launches 2026 WordPress Professionals Survey

For the fifth year in a row, the Admin Bar is benchmarking the “business side” of web development with its 2026 WordPress Professionals Survey.

Last year’s results from 1,200 pros revealed that Bricks was the only page builder gaining significant ground, and that agencies with a defined niche were 46% more likely to break six figures in revenue.

This year’s five-minute, anonymous survey dives deeper into AI integration and the evolving hosting landscape.

WordPress.org Launches Native Markdown Support for AI and Developers

WordPress.org has begun serving content in Markdown format, a major step toward becoming part of the agentic web. First announced on Make WordPress Meta, this update allows developers and AI agents to append .md to many WordPress.org URLs—including plugin directories and handbooks—to receive clean, structured data.

As noted in The Repository, this lowers token costs for LLMs and reduces AI hallucinations by providing “ground truth” documentation in a machine-readable format.

Decentralization at a Crossroads: FAIR Co-Founders Step Back

The Federated and Independent Repositories (FAIR) project is entering an uncertain chapter as co-founders Joost and Marieke de Valk officially step back to encourage broader community ownership. Since we noted the arrival of FAIR 1.0 and the security MVP with Patchstack, the project has sought to reduce reliance on a single central authority.

As reported in The Repository, the community is now weighing whether hosting companies and developers will maintain this decentralized infrastructure or if momentum will stall without its original advocates.

WordPress.org Now Rotates “Hidden Gems”

Following a community-led push, the WordPress.org Featured Plugins tab is now rotating “Hidden Gems” every two weeks. This shift mirrors the “quality over popularity” logic we explored in our coverage of the Hidden Gems plugin. By showcasing high-rated, low-install tools, the repository is providing independent developers a legitimate path to visibility based on merit rather than marketing budget.

Meet “Dewey,” the Clippy for WordPress

Nick Hamze has fulfilled a childhood dream by releasing “Dewey,” a Clippy-style assistant for the WordPress dashboard. Built to bring late-90s quirky energy to the modern CMS, Dewey offers “help” directly within the Block Editor. You can experience this nostalgic experimental design yourself by spinning up a live WordPress Playground instance using the project’s official blueprint.

Rethinking the Interface: Are We Asking the Right Questions?

In a thought-provoking new post, Jamie Marsland suggests the WordPress community is asking the wrong question about AI. Rather than wondering how to add AI buttons to existing tools, Marsland argues we should consider that users likely want AI instead of a complex software interface. He posits a paradigm shift where users simply talk to their website to make it “just work,” moving from traditional editing to natural, conversational creation.

Customizing WP Engine’s Newsroom Publication Checklist

In the publisher workflow, checklists are important to ensure that you don’t miss anything. Imagine how messy or unorganized things can get without checklists in your everyday life, let alone content you are writing for work.

In WordPress, WP Engine’s Newsroom features the Publication Checklist. It is a customizable quality-control tool that ensures all editorial standards are met before a story goes live.

The publication checklist helps you move away from time-consuming administrative content checks. Completely configurable to your requirements, the checklist flags missing items in real-time to editors before publishing, and gives customized suggestions to make sure your content meets everything you need it to.

In this article, Fran Agulto walks us through how to customize and use these features as well as integrate them with work management software.

YouTube cover image

Architecting Reliable Remote Requests with the HTTP API

Every time your code reaches out to an external API, you are introducing a point of failure that you do not control. Whether you are fetching a social feed, a weather widget, or processing a payment, your site’s performance is now tied to a third party.

A common mistake is treating a remote request like a local database query. If the external server is slow, your site becomes slow. If the external server is down, your site might crash or hang indefinitely. Professional WordPress development requires a defensive architecture that anticipates these failures. By using the WordPress HTTP API correctly, you can protect your site from external volatility.

In this article, we explore how to move beyond basic requests by architecting a defensive fail-safe strategy using the WordPress HTTP API to shield your site from external server volatility. By prioritizing rigorous error handling and strategic caching through the Transients API, you can ensure your site remains fast and stable even when third-party services stumble.

What’s the most interesting news you’ve come across recently? Pop by Twitter and let us know.

The post Delicious Brain Bytes: Code Redefined, “Clippy” for WordPress, and Customizing Publication Checklists appeared first on Delicious Brains.

Database Indexing: The Missing Manual for WordPress

2 March 2026 at 20:48

WordPress® is built to be a flexible application framework, but that flexibility comes with a trade-off in the form of a “one size fits all” database schema. For most sites, the default indexes provided by WordPress core are sufficient. However, as your site grows and your wp_postmeta and wp_options tables climb into the millions of rows, those standard indexes eventually hit a ceiling.

A site might feel fast on the frontend due to page caching, but a crawling dashboard or a ballooning slow query log indicates a database that is struggling to find data. Moving beyond standard tables requires an understanding of how MySQL indexing works and when to implement custom indexes to prevent full table scans.

How Indexing Works: The “Library” Analogy

In a database without an index, MySQL must perform a full table scan. This means it looks at every single row on the disk to find a match for your query. If you have 2.5 million rows of post meta, this process is incredibly slow and resource-intensive.

An index acts as a table of contents for your data. Instead of reading every page, MySQL uses a B-Tree structure to jump directly to the relevant information in logarithmic time.

This sounds great, but remember that there’s no such thing as a free lunch. While indexes dramatically speed up reads, they slightly slow down writes. Every time you insert or update a row, MySQL also updates the index file. On small tables, the performance gains are minimal and might even add unnecessary overhead. However, on large-scale sites, a missing index is often the primary cause of server bottlenecks.

The wp_options Bottleneck and the 1MB Buffer

The wp_options table is arguably the most common source of administrative slowness. WordPress is designed to query every row where autoload = 'yes' on every single page load to populate the object cache.

Depending on your hosting platform, these autoloaded values may be stored as a single row in the persistent object cache. This is where the 1MB buffer limit becomes a critical architectural guardrail. If the total size of your autoloaded data exceeds this 1MB limit, the cache layer may reject the request. This forces WordPress to repeatedly query the database for the same massive dataset, often resulting in a loop of failed requests and 502 Bad Gateway errors.

Even if you stay under the 1MB limit, a bloated options table makes primary index lookups less efficient. Keeping your wp_options table lean, ideally under 800,000 bytes, is essential for maintaining a healthy object cache and ensuring fast Time to First Byte (TTFB) for all requests.

Solving the wp_postmeta Nightmare

The wp_postmeta table is a “vertical” table that uses key/value pairs. By default, the meta_value column is not indexed because it uses a longtext data type.

If you run a meta_query that filters by meta_value, such as searching for all products within a specific price range, MySQL is forced to scan every single row of metadata. When your table reaches the millions, these queries can take seconds to execute.

The solution is often a partial (or prefix) index. Because you cannot index an entire longtext field, you can tell MySQL to index only the first $N$ characters of the column. This allows for significantly faster filtering while keeping the index size manageable.

Tools for Database Forensics

Before adding custom indexes, you must identify exactly which queries are causing the bottleneck.

  • Query Monitor is highly regarded for identifying slow queries directly within the WordPress UI. It highlights duplicates and expensive queries, allowing you to see exactly which plugin or theme component is responsible.

  • EXPLAIN: If you have a specific slow query, prefixing the SQL statement with EXPLAIN in a tool like phpMyAdmin or MySQL Workbench will reveal how MySQL intends to execute it. If the type column shows ALL, you have confirmed a full table scan is occurring.

  • For production environments where you want minimal overhead, the MySQL Slow Query Log records every statement that exceeds a defined time limit.

Conclusion: Stewardship of the Schema

Database indexing is not a “set it and forget it” task. As a site evolves, so do its data patterns. A query that was fast with 10,000 rows can become a site-killer at 1,000,000 rows.

Proper stewardship of the WordPress schema involves regular audits of your autoloaded data and the strategic application of custom indexes. By keeping your wp_options under the 1MB buffer and ensuring your meta queries are supported by indexes, you protect your site’s scalability and ensure a smooth experience for both visitors and administrators.

The post Database Indexing: The Missing Manual for WordPress appeared first on Delicious Brains.

Taming the Heartbeat API: Preventing `admin-ajax.php` Overload

17 February 2026 at 16:53

When it comes to WordPress® performance, we often focus on the big metrics: page load speed, database query optimization, and asset minification. However, there is a silent pulse running in the background of every WordPress installation that can, under the right conditions, bring even a robust server to its knees.

This pulse is the WordPress Heartbeat API.

Introduced in WordPress 3.6, the Heartbeat API provides a way for the browser to communicate with the server in real-time while a user is logged into the dashboard. It manages essential features like session concurrency, auto-saving posts, and post locking, ensuring that two editors don’t accidentally overwrite each other’s work.

While these features are vital for a collaborative environment, the Heartbeat API’s default behavior isn’t always optimized for high-concurrency sites. If left unmanaged, it can lead to exhausted server resources and impacts on site stability.

Anatomy of a Heartbeat Request

The Heartbeat API functions by sending a POST request to admin-ajax.php at regular intervals (usually every 15 to 60 seconds). The journey of a single “pulse” looks like this:

  1. Browser Trigger: The JavaScript on the client side initiates a request.
  2. Server Contact: The request hits admin-ajax.php.
  3. WordPress Bootstrap: Even though it’s a background request, WordPress must perform a full bootstrap—loading the core, active plugins, and the theme—to process the request.
  4. Response: The server sends back data (like the “post locked” status) to the browser.

The critical issue here is that Heartbeat requests are uncacheable. Because they are POST requests sent to the administrative backend, they bypass standard page caching. Every single pulse requires a dedicated PHP worker to process.

On a site with a single editor, this is negligible. The math changes rapidly when it’s a site with 50 concurrent users, whether they are editors in a newsroom or students in a learning management system. Fifty users with the dashboard open can generate hundreds of uncacheable requests per minute, saturating the server’s capacity.

Diagnosing the Impact

Identifying a “Heartbeat Storm” starts with the server logs. If your access logs are filled with repetitive POST requests to /wp-admin/admin-ajax.php with the action heartbeat, the API is likely the culprit.

Beyond logs, this overhead manifests as a drain on PHP workers. PHP workers are the engines that process the PHP code on your site. Since a worker is “occupied” for the duration of every Heartbeat pulse, a high volume of these background tasks leaves fewer workers available to serve actual frontend traffic to your visitors.

Programmatic Throttling: The heartbeat_settings Filter

You do not necessarily need to disable the Heartbeat API entirely.Doing so would break useful features like auto-save. Instead, another approach is to throttle the interval.

By default, the “pulse” happens every 15 seconds when you are editing a post. You can use the heartbeat_settings filter to change this interval to the maximum allowed (60 seconds), significantly reducing the load.

/**
 * Throttle the Heartbeat API to 60 seconds.
 */
add_filter( 'heartbeat_settings', function( $settings ) {
    $settings['interval'] = 60; // Set to the maximum allowed 60 seconds
    return $settings;
});

Contextual Control

In some cases, you may want to disable the Heartbeat API on specific parts of the site where it serves no purpose. For instance, there is rarely a need for the heartbeat to run on the frontend of the site for non-administrative users.

You can selectively deregister the script based on the screen or the user’s capabilities:

/**
 * Disable Heartbeat on the frontend unless a user is editing a post.
 */
add_action( 'init', function() {
    if ( ! is_admin() ) {
        wp_deregister_script( 'heartbeat' );
    }
});

Architecting for Stability

Managing the Heartbeat API is a key component of site reliability engineering for WordPress. By slowing down the background pulse, you ensure that your server’s resources—specifically its PHP workers—are prioritized for the most important task: serving your content to your audience.

Standardizing these throttles in your theme or a core functionality plugin allows for a more predictable server load, preventing administrative activity from ever becoming a bottleneck for site performance.

The post Taming the Heartbeat API: Preventing `admin-ajax.php` Overload appeared first on Delicious Brains.

The Art of the WordPress Transient: Performance, Persistence, and Database Bloat

10 February 2026 at 18:48

In the hierarchy of WordPress® data storage, transients often occupy a misunderstood middle ground. They aren’t quite as permanent as options, yet they aren’t as ephemeral as a standard PHP variable.

The Transients API is designed to store cached data with an expiration time. It is the go-to tool for developers looking to cache expensive operations like remote API calls and complex database queries. It ensures that a single slow request doesn’t degrade the experience for every subsequent visitor.

However, beneath the simple set_transient() wrapper lies a complex relationship with the WordPress database that, if left unmanaged, can lead to significant performance bottlenecks.

Under the Hood: The wp_options Forensics

To understand how transients affect a site, we must look at how they are physically represented in the database. When a transient is created using the standard WordPress configuration, it doesn’t just create one row in the wp_options table; it creates two.

Consider the following command:

`set_transient( 'github_api_data', $value, HOUR_IN_SECONDS );`

In the wp_options table, WordPress will generate:

  1. _transient_github_api_data: This row contains the actual serialized value of the data.
  2. _transient_timeout_github_api_data: This row contains a Unix timestamp representing the moment the data should expire.

The logic follows a simple mathematical check every time get_transient is called to determine if the data is still valid:

$$\text{is\_expired} = (\text{current\_time} > \text{timeout\_timestamp})$$

If this calculation evaluates to true (meaning the clock has passed the expiration point), WordPress deletes the expired rows and returns false to the application. This false response serves as the signal to the developer that it is time to refresh the data and set the transient once again.

However, there’s a hidden danger here. It lies in how WordPress handles the autoload flag for these rows. While transients with an expiration, like our example above, are not autoloaded, any transient set without an expiration is automatically set to autoload: yes. This means every time a page is requested, those rows are pulled into memory, even if the current page doesn’t need them. If a developer inadvertently creates numerous non-expiring transients, this global overhead can quickly exceed the 1MB buffer limit of the object cache.

This means every time a page is requested, these rows are loaded into memory by the WordPress core, regardless of whether that specific page actually needs the GitHub API data. On a site with hundreds of transients, this global overhead begins to chip away at PHP memory limits.

The Garbage Collection Problem

A common misconception is that WordPress has a background process, a sort of garbage collector, that automatically deletes expired transients.

In reality, an expired transient is only deleted when it is specifically requested via get_transient(). If a plugin is deactivated, or if a developer changes the name of a transient key, the old “expired” rows may sit in the wp_options table indefinitely.

On high-traffic sites or those using dynamic naming conventions, this can result in thousands of orphaned rows. This bloat increases the size of the database index and slows down every single query targeting the wp_options table.

Manual Cleanup: Identifying and Removing Bloat

For sites with significant transient bloat, you can use the following SQL query to safely remove all expired transients from the wp_options table. This is particularly useful for cleaning up “orphaned” rows left behind by deactivated plugins or old dynamic keys.

DELETE a, b FROM wp_options a
JOIN wp_options b ON a.option_name = REPLACE(b.option_name, '_transient_timeout_', '_transient_')
WHERE b.option_name LIKE '_transient_timeout_%'
AND b.option_value < UNIX_TIMESTAMP();

This works by identifying the “timeout” row (_transient_timeout_) and checks if the stored Unix timestamp is older than the current time. It then joins the corresponding data row (_transient_). Finally, it deletes both rows simultaneously, ensuring your database stays lean and indexed properly.

Scaling with WP Engine Object Caching

One way to address the issue of transient bloat is to leverage the object cache layer provided by your hosting environment. On the WP Engine platform, object caching is a primary tool used to improve site stability, speed, and scalability.

Unlike standard WordPress installations where you might need to configure this manually, object caching is enabled by default on all new WP Engine environments. This layer acts as a specialized storage area that sits between your site and the database. When an operation like a transient request is made, the server first checks this caching layer for a result. If the data is found, it is served immediately, completely bypassing the need for a database query.

This greatly reduces the load on your server, but it’s not a bottomless storage solution. It requires a clear understanding of how your site uses transients and options, particularly those stored as autoloaded data.

The Benefits and Constraints of Object Caching

Implementing an object cache layer offers several technical advantages for high-traffic sites:

  • Reduced Database Latency: By storing the results of repeated queries, the server significantly reduces the time spent accessing the database.

  • Improved Server Health: The server stays “healthier” because it spends less energy and fewer resources searching the database for the same information repeatedly.

  • Intelligent Memory Management: The object cache does not clear on a fixed schedule. Instead, it uses a “Least Recently Used” (LRU) algorithm to automatically identify and remove older query results only once its allocated storage space is full.

The 1MB Buffer Caveat

Despite these benefits, developers must be mindful of the 1MB buffer size limit. Object caching stores autoloaded values as a single long row. If your transients and other autoloaded data combined surpass what the cache can handle, the system will reject the request.

This rejection can trigger a dangerous loop. WordPress requires the data to load the page and will immediately send the request again, eventually resulting in a 502 error on the site. To maintain a healthy environment, it is recommended that all autoloaded data stays below 800,000 bytes. If you encounter persistent 502 errors after adding new transients, temporarily disabling object caching may be necessary while you identify and reduce the volume of autoloaded data.

Developer Best Practices

To maintain a healthy balance between performance and persistence, consider these updated standards for your development workflow:

  • Strict Namespacing: Use a consistent, unique prefix for all transient keys to make them easily identifiable during a database audit or when debugging.

  • The “Get/Check/Set” Pattern: Always handle the “false” return of a missing transient gracefully using the strict identity operator (=== false). Because a transient might store a “falsy” value like an empty string or the number 0, a loose check could trigger an unnecessary and expensive data refresh. Remember that a transient is a “best-effort” cache. Your code should never be written with the assumption that the data will be there when requested.

  • Key Length Management: Keep your transient keys under 172 characters. WordPress appends prefixes like _transient_timeout_ to your key before saving it to the database; if the total string exceeds the character limit of the option_name column, the transient may fail to save or retrieve correctly.

  • Mind the Expiration: Avoid setting excessively long expirations for data that changes frequently. Shorter, more aggressive caching windows (e.g., 5 to 15 minutes) are often safer for maintaining site consistency and reducing the risk of serving stale content.

Conclusion

Transients are one of the most powerful tools in the WordPress developer’s arsenal, but they are not a “set it and forget it” solution. By understanding the database forensics behind the API and leveraging persistent object caching, you can ensure that your cache stays warm and your database stays lean.

The post The Art of the WordPress Transient: Performance, Persistence, and Database Bloat appeared first on Delicious Brains.

The Ultimate Savings Event for WordPress Professionals

17 November 2025 at 16:44

It’s the time of year when we roll out delicious savings! We’re offering new customers big savings on the essential plugins trusted by top developers and agencies worldwide. Whether you’re trying to move a complex website, offload a massive media library, or structure cutting-edge content, this is the best time to invest in the power and efficiency you need.

This sale covers our entire suite of plugins, with savings of up to 50% on your first year’s license for new customers. Plus, we’ve got deals on other WP Engine products like ACF PRO and NitroPack, so you can build your perfect tech stack at the lowest price of the year. Please note that all discounts listed below are for new customers only.

Cyber Savings on Developer Essentials

Here’s a breakdown of the incredible deals available on WP Engine’s developer-focused plugins:

  • WP Migrate Pro: The ultimate site-moving plugin is on sale! Save up to 50% on your first year and stop losing time to manual, complicated migrations.
  • WP Offload Media: Reduce your server load and speed up media delivery by offloading files to the cloud. Save up to 40% on your first year.
  • WP Offload SES: Guarantee reliable email delivery for all your mission-critical site functions. Save up to 20% on your first year.
  • ACF PRO: The foundation for content modeling, including Repeaters, Flexible Content, and ACF Blocks v3! Get the tools trusted by pros with up to 40% off licenses for the first year.
  • NitroPack: Achieve top scores on Core Web Vitals and get an instant site speed boost! Save up to 40% on plans (excluding the Starter Plan). This special discount replaces any existing evergreen deal.

Don’t Miss Out!

The time to invest in efficiency, performance, and structure is now, with savings on every tool you need to build faster, more stable, and more profitable client sites.

The sale runs from November 17th through December 5th, 2025. Make sure to get these deals now and upgrade your entire WordPress workflow!

The post The Ultimate Savings Event for WordPress Professionals appeared first on Delicious Brains.

Delicious Brain Bytes: WordPress 6.9 RC1, FAIR’s Security MVP, and Finding Hidden Gems

13 November 2025 at 21:40

In this issue of Delicious Brain Bytes, we track the final progress of WordPress 6.9 RC1 and the new Abilities API, explore the security advancements of the FAIR/Patchstack collaboration, preview the future of ACF Blocks, and much more!

WordPress 6.9 and the Abilities API

The final major WordPress release of 2025 is right around the corner. WordPress 6.9 Release Candidate 1 is now available, putting the release on track for its scheduled launch on December 2, 2025. The core team encourages all developers and users to test the RC1 build to ensure stability, particularly since new features like the improved Site Editor experience and the universal Command Palette are included.

The 6.9 release includes several key developer updates, such as enhancements to the DataViews components and the Interactivity API. However, the most foundational change is the introduction of the Abilities API.

The Abilities API is a new foundational system designed to transform how plugins, themes, and WordPress core expose their functionality. It allows developers to register self-contained units of functionality—an “ability”—with standardized inputs, outputs (using JSON Schema), and permissions.

This system is a key part of the broader AI Building Blocks initiative. By registering abilities using the new PHP functions, developers make their plugin features discoverable and executable by AI agents, automation tools, and other systems. Registered abilities are automatically exposed through a new REST API endpoint (wp-abilities/v1), creating a unified, machine-readable registry of functions. This eliminates the need for isolated functions or custom AJAX handlers, simplifying integration and offering developers a predictable method for building the next generation of AI-powered WordPress solutions.

Developers are urged to begin testing the RC1 and exploring the detailed documentation for the Abilities API now. You can download and test RC1 via the WordPress Beta Tester plugin or view the Abilities API documentation here.

A New Era for Custom Blocks with ACF

The Advanced Custom Fields (ACF) team is hosting a webinar to showcase the latest advancements in ACF Blocks and how modern developers are leveraging them for efficient, creative WordPress solutions.

The session will cover the full spectrum of ACF’s power, from fine-tuning the client editing experience to establishing structured data for the emerging “agentic web.” Speakers Rob Stinson and Iain Poulson will provide a quick “ACF 101” refresher before diving into a live demo of features from recent releases, highlighting how custom block creation has taken a significant leap forward. The team will also address how pairing ACF PRO with managed hosting platforms like WP Engine can unlock new workflow opportunities.

This session is designed to empower developers to build more efficient and creative solutions. The live webinar takes place on Wednesday, November 19, 2025, at 10am CT / 4pm GMT. Secure your spot now and discover the new capabilities transforming the custom block creation experience.

Solving the Plugin Discovery Crisis

A new plugin called Hidden Gems aims to fundamentally change how developers and users find quality software in the WordPress ecosystem. The plugin addresses a core issue: the default plugin directory prioritizes popular tools with millions of installs, leaving thousands of excellent, lesser-known plugins flying under the radar.

The Hidden Gems plugin solves this by adding a dedicated tab to the “Add New Plugin” screen, using a smart discovery logic built on “quality over popularity.” It defines a “hidden gem” as a plugin that maintains excellent ratings (3+ stars) but has low installation counts (often filtered to under 10K). This logic ensures that users bypass poor-quality, unknown plugins and well-known, established ones to find truly innovative solutions before they become mainstream.

For plugin developers, this tool creates a pathway for quality to be recognized without requiring a massive marketing budget. For users, it offers a competitive advantage by surfacing niche solutions and high-quality alternatives. The plugin includes advanced filtering options based on installation limits, quality thresholds, and more.

You can read the full story behind the plugin’s creation here and find the plugin itself on GitHub.

Big Savings on Developer Tools

It’s the best time of year to pick up new developer tools! We’re offering new customers big savings on the essential plugins trusted by top developers and agencies worldwide. Whether you’re trying to move a complex website, offload a massive media library, or structure cutting-edge content, this is the best time to invest in the power and efficiency you need.

This sale covers WP Migrate Pro, WP Offload Media, WP Offload SES, ACF PRO, and NitroPack, giving you the chance to build your perfect tech stack at the lowest price of the year. Please note that all discounts listed below are for new customers only.

Here’s a breakdown of the incredible deals available on WP Engine’s developer-focused plugins:

  • WP Migrate Pro: The ultimate site-moving plugin is on sale! Save up to 50% on your first year and stop losing time to manual, complicated migrations.
  • WP Offload Media: Reduce your server load and speed up media delivery by offloading files to the cloud. Save up to 40% on your first year.
  • WP Offload SES: Guarantee reliable email delivery for all your mission-critical site functions. Save up to 20% on your first year.
  • ACF PRO: The foundation for content modeling, including Repeaters, Flexible Content, and ACF Blocks v3! Get the tools trusted by pros with up to 40% off licenses for the first year.
  • NitroPack: Achieve top scores on Core Web Vitals and get an instant site speed boost! Save up to 40% on plans (excluding the Starter Plan). This special discount replaces any existing evergreen deal.

The time to invest in efficiency, performance, and structure is now, with savings on every tool you need to build faster, more stable, and more profitable client sites.

The sale runs from November 17th through December 5th, 2025. Make sure to get these deals now and upgrade your entire WordPress workflow!

FAIR and Patchstack Build Security MVP at CloudFest Hackathon

As reported in The Repository, the decentralized architecture of the FAIR Package Manager recently took a major step toward robust security integration at the inaugural CloudFest USA Hackathon. A collaborative team from FAIR and Patchstack built a Minimum Viable Product (MVP) for the FAIR Software Security Assistant.

The project’s goal was to surface vulnerability warnings directly in the WordPress admin by translating Patchstack’s vulnerability data into FAIR’s trust labeling model. This model allows independent organizations to attach verified trust signals to plugins. FAIR technical steering committee co-chair Carrie Dils noted the process was crucial for figuring out “how we talk to the API, how we turn that into labels, and how we build rules around those labels.”

The resulting policy engine will allow hosts or site owners to define automated rules—such as automatically hiding critically vulnerable plugins from the search screen—addressing supply-chain security directly during plugin discovery. This MVP demonstrates a model where decentralization and security are designed to work together.

Understanding WP Engine’s Smart Search AI Model Context Protocol (MCP) Server

The Smart Search AI MCP Server is a powerful new feature in WP Engine’s AI Toolkit that transforms your WordPress site into a dynamic, real-time knowledge base for any external Large Language Model (LLM) you connect to it. When enabled, this server responds to requests from AI tools formatted using the Model Context Protocol (MCP) standard.

In this article, Fran Agulto discusses what MCP is, how to work with the Smart Search AI MCP Server, and how it enhances the Smart Search AI product.

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

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.

What’s the most interesting news you’ve come across recently? Pop by Twitter and let us know.

The post Delicious Brain Bytes: WordPress 6.9 RC1, FAIR’s Security MVP, and Finding Hidden Gems appeared first on Delicious Brains.

Delicious Brain Bytes: WordPress 6.9, ACF PRO 6.5, and Unleash the Wapuu

21 August 2025 at 18:16

In this issue of Delicious Brain Bytes, we look into WordPress 6.9, round up the latest industry surveys, figure out how to make Postgres much slower, and much more!

WordPress 6.9 Set for December 2nd

WordPress is set for a second major release in 2025. After an increase in contributor capacity, project leadership has moved forward with a full release. As detailed by Anne McCarthy in a recent roadmap post, WordPress 6.9 is scheduled to be released on December 2nd, 2025. This release turns its attention to evolving the Site Editor, enabling new collaborative workflows, and enhancing the platform’s foundation for developers and AI.

Of note, there will not be a new default theme in this release.

WordPress 6.9 will introduce a simplified site editing mode that separates content editing from advanced design tools, offering a less overwhelming experience for users who only need to update text or imagery. Template management is also being overhauled to allow for multiple templates per slug, with the ability to draft new templates and preserve them when switching themes. Additionally, the new release will introduce block-level commenting, enabling asynchronous collaboration workflows directly within the editor.

This release brings significant updates for developers, laying the groundwork for a more robust and extensible platform. The new Abilities API will provide a unified registry of callable functions, making core WordPress functionality accessible to AI systems. Meanwhile, updates to the Interactivity API will enable a new client-side navigation algorithm that supports full-page transitions, and enhancements to the Block Bindings API will extend its support for more core blocks and data sources.

A key focus of WordPress 6.9 is on performance. Planned improvements include faster page transitions, smarter resource handling, and stylesheet enhancements. Looking beyond the official release, several major projects are scheduled to launch as canonical plugins alongside 6.9, including a new WordPress Admin experience, the Model Context Protocol (MCP) Adapter to standardize how applications provide context to large language models, and a PHP AI Client SDK to simplify AI integration for developers.

ACF PRO 6.5 Improves Flexible Content

Advanced Custom Fields (ACF) PRO 6.5 is now available, bringing a host of user experience improvements to its Flexible Content field. The update is specifically designed to give content editors more clarity and control when managing complex pages.

Key improvements for the Flexible Content field include the ability to rename layouts in the editor to provide custom labels (e.g., “Pricing CTA”), disable layouts without deleting them to allow for a non-destructive way to stage or archive content, highlight the active layout to give editors a clear sense of their position on a page, and collapse and expand layouts in bulk, which makes navigating long pages much faster.

The release also removes dynamic class properties across the codebase to ensure compatibility with modern PHP versions and adds an option to default date fields to the current date.

For more information, please see the ACF PRO 6.5 release post.

Renaming a layout in ACF PRO 6.5.

Where Does WordPress Go From Here?

Two prominent figures in the WordPress community have recently raised fundamental questions about the platform’s long-term viability. Kevin Geary and Jamie Marsland have each published pieces that, while coming from different angles, point to a single conclusion: WordPress is at a critical juncture, and its current architecture and strategic direction may be holding it back.

In The WordPress Architecture Crisis, Kevin Geary argues that the platform suffers from a foundational flaw by confusing design and architecture. He points out that themes, which should only control a site’s look and feel, are instead treated as all-in-one packages that include a site’s core functionality. This confusion, Geary says, violates the principle of “separation of concerns” and has created a fragmented ecosystem where themes are incompatible, and work can be lost when users try to change designs. He suggests that Gutenberg’s introduction was a missed opportunity to create a unified, component-based system that could have fixed these long-standing issues.

Taking a broader view, Jamie Marsland’s article, I’m Not Sure WordPress Can Be WordPress Anymore, contends that the platform is at risk of falling behind because it is still largely seen as “just a website builder.” Marsland notes that the web is moving toward “app-ification,” with AI-native tools allowing users to build and deploy full applications in minutes. While these new platforms are often proprietary “black boxes,” Marsland argues that WordPress, with its brand, distribution, and open-source community, is perfectly positioned to be the open-source alternative. He poses a strategic question: should WordPress’s mission to “democratize publishing” evolve to “democratize building for the web”?

Both authors highlight a central tension within WordPress. Geary points to a technical and architectural trap, while Marsland focuses on a strategic and market-driven one. However, both believe that if WordPress can shed its legacy constraints and embrace a more flexible, forward-looking identity, it can unlock its full potential and compete in the next era of web development.

From Blazingly Fast to Staggeringly Slow

Always optimizing for speed? One developer took the opposite approach. In a hilarious and surprisingly technical blog post, Jacob Jackson chronicled his quest to build a Postgres configuration that operates as slowly as possible.

Instead of focusing on performance, Jackson intentionally misconfigured a number of key parameters in postgresql.conf. He shrunk the buffer cache to force every query to hit the disk, cranked up the database’s background work to constantly get in the way, and reconfigured I/O to be as inefficient as possible.

The result? A “successful” performance degradation of more than 42,000 times, bringing Postgres down to a sluggish 0.1 transactions per second. It’s a masterful (if entirely useless) demonstration of how a database’s configuration can be its own worst enemy.

Get all the details in Making Postgres 42,000x slower because I am unemployed.

Higher Ed Report Reveals Mixed Feelings on WordPress

A new report from WPCampus and enterprise agency Human Made, The State of WordPress in Higher Education, reveals a complex picture of WordPress adoption and sentiment across universities. The report, based on a survey of 115 higher education professionals, shows that while WordPress is thriving in the sector, many teams are also grappling with significant challenges and a cautious outlook on the platform’s future.

The report’s findings highlight strong points, with 70% of respondents saying WordPress meets or exceeds their expectations due to its extensibility, multisite support, and cost-effectiveness. However, a significant 62% of respondents also reported having internal discussions about whether to continue with the platform. Key frustrations include uneven adoption of the Block Editor (used on all sites by only 40% of respondents), a lack of resources, plugin compatibility issues, and governance concerns.

Ultimately, the study points to a growing gap between WordPress’s core strengths and the evolving needs of a demanding sector. Higher education professionals are satisfied with the platform’s foundational capabilities but are asking for improvements in areas like accessibility, training, and governance to ensure its long-term viability.

Have Your Say: The State of HTML and SOEWP Surveys Are Now Open

This is your chance to help shape the future of the web. Two key industry surveys are now open, inviting developers to share their insights and influence the direction of both web standards and the WordPress ecosystem.

In addition, the ACF Annual User Survey is still collecting responses. You can provide your feedback and help guide the direction of the plugin at advancedcustomfields.com/annual-survey/.

The State of HTML Survey

The State of HTML survey is back, offering developers a direct way to provide input on the direction of web browsers. The survey, curated by Lea Verou, goes far beyond HTML markup to include topics like accessibility, browser APIs, web components, and static site generation.

The 2025 survey aims to measure awareness and usage of new web platform features. The results are used by browser vendors to inform their roadmaps and prioritize key projects, making this an impactful way for you to make your voice heard.

The State of Enterprise WordPress Survey

Now in its third year, the State of Enterprise WordPress survey is inviting enterprise users of WordPress to share their insights. The survey gathers valuable data on how WordPress is being used at scale.

For developers and agencies working with large organizations, the survey is a crucial tool for identifying key trends, challenges, and priorities in the enterprise space. The findings will be published in a free, in-depth report that provides a unique view into the needs of high-stakes, complex WordPress implementations.

New Card Game Lets You Sabotage Your WordPress Dashboard

Marcus Burnette has turned the much-loved WordPress mascot into a strategy card game for the community. Titled Unleash the Wapuu, the game is a fast-paced mix of engine-building and sabotage. Players build their dashboards with Team Wapuus, upgrade them with plugins, and use malware and function cards to derail the competition. It’s a game filled with WordPress in-jokes and playful, chaotic fun.

Burnette, a longtime Wapuu enthusiast, created the game in a few weeks with the help of generative AI and the open-source GPL license. He used ChatGPT to brainstorm card names, generate game text, and create artwork based on the original Wapuu mascot. This creative, community-focused project is available to preorder and will be brought to WordCamp US for attendees to play in person.

A selection of cards from the "Unleash the Waapu" card game.

Creating a Headless eCommerce Search Experience

Have you ever tried to buy something on a website only to have its poor search feature send you somewhere else? The search feature is an essential tool on any eCommerce site for converting visitors into customers. It helps users find and purchase products quickly and efficiently.

This is where WP Engine’s Smart Search AI steps in. It’s a product for WP Engine customers that replaces WordPress’s built-in search with an intelligent, AI-driven engine for both traditional and headless WordPress applications. Smart Search AI guides visitors to the most relevant content using semantic understanding to surface better results, even for custom post types.

In this article, Francis Agulto shows you how to create a full headless WordPress eCommerce search experience with WooCommerce, WPGraphQL, and WP Engine Smart Search AI.

YouTube cover image

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

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.

What’s the most interesting news you’ve come across recently? Pop by Twitter and let us know.

The post Delicious Brain Bytes: WordPress 6.9, ACF PRO 6.5, and Unleash the Wapuu 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.

Moving WordPress to a New Domain: A Step-by-Step Guide Without Breaking Links

31 July 2025 at 19:36

Relocating a WordPress website to a new domain is a frequent task for developers, but it often comes with the risk of broken links and lost content. Ensuring a seamless transition where every URL, image, and internal reference correctly points to your new domain is critical for user experience and SEO.

In this article, we outline the steps required to move your WordPress site to a new domain without breaking links. We will primarily utilize WP Migrate Lite for the core migration process, demonstrating precise database and file handling. We’ll also explore how WP Migrate can further streamline and accelerate these domain transfer workflows.

Understanding the Domain Migration Challenge: Why Links Break

Moving a WordPress website to a new domain often results in broken links. This happens because WordPress stores absolute URLs and file paths directly within its database. It doesn’t rely solely on relative paths.

A WordPress site’s primary address is stored in the siteurl and home options within the wp_options table. However, beyond these obvious locations, your old domain’s URL is embedded in countless other places:

  • Within the content of your posts and pages in the wp_posts table.
  • In custom fields managed by plugins or themes (often in wp_postmeta).
  • In widget settings, navigation menus, and various plugin configurations, which are frequently stored as complex, serialized data within the wp_options table or custom tables.
  • Direct links to media files, which also contain the domain name.

The challenge with this deep embedding, particularly with serialized data, is that a simple text-based search and replace on a raw SQL file can corrupt these complex data structures. If the length of the string changes during a simple replacement, it can break the serialization, rendering menus, widgets, and many plugin settings nonfunctional. The solution is to use a tool that can intelligently find and replace these URLs and paths while preserving data integrity.

Pre-Migration Checklist: Preparing for a Smooth Transition

A successful WordPress domain migration relies heavily on thorough preparation. Taking the time to complete a few key steps before you begin the transfer process can save you from significant headaches, unexpected downtime, and data loss. This checklist ensures your source site is ready for export and your destination environment is prepared to receive the data.

Full Backup: Your Essential Safety Net

Before making any changes to your live site, the single most critical step is to create a complete and verified backup of your entire WordPress installation. This includes both your database and all your website files (themes, plugins, media uploads, and core WordPress files). This backup serves as your absolute failsafe. If anything goes wrong during the migration, you can revert to the original state of your site without permanent data loss. Store this backup securely in an off-site location, not on the same server.

Update Everything

Outdated WordPress core files, themes, or plugins can introduce compatibility issues or unexpected behavior during a migration. Before you begin the export, ensure that all components of your source WordPress site are updated to their latest stable versions. This minimizes the chances of encountering errors related to old code when the site is transferred to a new environment.

Clean Up Your Site

To reduce the size of your migration package and streamline the transfer process, it’s beneficial to perform a site cleanup. This involves:

  • Deleting unused themes and plugins: Remove any themes or plugins that are no longer active or necessary.
  • Removing old media: Consider deleting any unused images or media files from your Media Library that are no longer relevant to your site.
  • Cleaning your database: Utilize a database optimization plugin or manually clear old post revisions, spam comments, and transient options. A smaller, cleaner database will export and import faster.

Prepare Your New Domain and Hosting Environment

Before initiating any export from your old site, ensure your new destination is ready.

Make sure the new domain name is registered and accessible and have your new hosting account provisioned and ready. It is generally recommended to start with a completely fresh, default WordPress installation on your new domain. This provides a clean slate to import your old site’s data and files into. You’ll replace its database and wp-content folder with your old site’s data.

Step-by-Step: Moving Your Site with WP Migrate Lite

This section looks at the steps required to export your site’s database and files from your old domain and successfully import them onto your new one, ensuring all internal links are correctly updated.

WP Migrate Lite offers a Full Site export option that bundles both your database and files, but in this case we’re going to export the database and files separately. For a domain migration, this approach emphasizes the critical URL replacement within the database, provides greater control over each component for precise execution, simplifies troubleshooting if issues arise, and can make managing larger site transfers more efficient than a single, massive archive.

Install WP Migrate Lite on Your Old Domain’s WordPress Site

First, ensure the WP Migrate Lite plugin is installed and activated on the WordPress installation running on your old domain. You’ll find it by navigating to Tools .> WP Migrate in your WordPress admin sidebar.

Export Your Database with Domain Replacement

This is the most critical part of a domain migration, as it handles the updating of all old URLs to the new ones directly within your database. WP Migrate Lite’s intelligent Find and Replace feature is essential here.

From your old domain’s WordPress admin, access WP Migrate Lite’s main interface, select the Migrate tab, and then click Export

The Migrate tab in WP Migrate Lite, showing various options including "Export."

The “Database” checkbox should be checked by default. Next, click Tables, and ensure that the radio button “Export all tables with prefix “wp_”” is selected. This ensures every piece of data stored in the database is included, including site options, post content, and plugin settings.

Selecting database tables to migrate in WP Migrate Lite.

The next step is to configure a “Standard Find & Replace.” The “Find” field should be automatically pre-filled with your current (i.e., old) domain’s URL. In the “Replace” field, carefully enter the full URL of your new domain, ensuring you include the correct protocol (http or https).

WP Migrate Lite will intelligently handle serialized data within your database during this process, which is crucial for preventing data corruption that a simple text search-and-replace often causes.

You can also set a different path for your new domain. This isn’t necessary in most cases, as WP Migrate Lite will automatically set up the new path for you.

Once configured, click the Export button. WP Migrate Lite will process your database, perform the replacements, and generate a SQL file containing your database.

Running a find and replace in WP Migrate Lite.

Export Your WordPress Files

After exporting your database, the next step is to export all the necessary files from your old WordPress installation. This includes your themes, plugins, media uploads, and potentially other custom files or WordPress core itself.

Click on the Migrate tab and then select Export again. The “Database” section will be checked by default. Since you’ve already exported and handled your database in the previous step, the first action here is to uncheck the Database box.

Next, we’ll configure the file exports from the remaining sections.

Media Uploads

This section handles the files within your wp-content/uploads folder. Check the Media Uploads box. A dropdown will then appear offering three options for how to export these files. For a full domain migration where you want all your media to be on the new site, you should select “Export all media uploads”. This option ensures all files from your uploads folder are copied. The other options, “Export new and updated media uploads” and “Export media uploads by date,” are generally more suited for partial content syncs rather than a complete domain transfer.

Themes

This section allows you to export your theme files located in wp-content/themes. Check the Themes box. The accompanying dropdown provides several choices. For a complete domain migration, select Export all themes to ensure every theme from your old site is included. Other options like “Export only active themes” or “Export only selected themes” are available if you have specific needs.

Plugins

Similar to themes, this section manages the export of your plugin files from wp-content/plugins. Check the Plugins box. From the dropdown, select Export all plugins to include all plugins from your old site in the migration package. This section offers the same options as “Themes”, but for plugins.

Other Files

The “Other Files” section is for selecting any additional files or folders found directly within your wp-content directory that are not covered by the “Media Uploads,” “Themes,” or “Plugins” sections. Check the Other Files box. A checklist will then appear, allowing you to manually select individual files or folders you wish to include. These might be custom configurations, uploads outside the standard directory, or other specific assets. None are selected by default, so you must carefully choose any you need.

Each of the “Media Uploads,” “Themes,” “Plugins,” and “Other Files” sections also provides an advanced option to use gitignore patterns to exclude specific files relative to their respective directories. This is useful for highly customized exports where certain files (like cache files or development-specific assets) should not be migrated.

WordPress Core Files

The “WordPress Core Files” section addresses the core WordPress installation itself. Check the “WordPress Core Files” box. Including WordPress core files ensures that the exported archive contains the exact version of WordPress installed on your site, which is particularly helpful when replicating the site precisely in a new environment. This option includes the wp-admin and wp-includes directories, along with various root WordPress files such as index.php, license.txt, readme.html, and crucial configuration files like wp-config.php and wp-config-sample.php.

Once all your desired file sections are configured, click the “Export” button. WP Migrate Lite will package your selected files into a single ZIP archive.

.

Prepare Your New Domain’s WordPress Installation

Before importing your old site’s content, you need a fresh WordPress installation on your new domain to serve as the destination. Ensure your new domain name is pointed to your new hosting environment’s server, and then set up a completely fresh, default WordPress installation on your new domain.

Once the new WordPress site is accessible via your new domain, log in to its admin dashboard and delete any default content (e.g., “Hello world!” post, sample page, sample comment) to provide a cleaner slate for your imported data.

Manually Import the Database to Your New Domain

Now you will replace the fresh WordPress installation’s database on your new domain with the one you exported and modified from your old site.

Access your new domain’s database, typically through a tool like phpMyAdmin via your hosting control panel, or a command-line interface (CLI) if you have SSH access.

If using phpMyAdmin, select the database associated with your new WordPress installation from the left sidebar. Click on the Structure tab. Scroll to the bottom of the list and click the checkbox labeled Check all. From the “With selected:” dropdown menu, choose “Drop”. You will receive a confirmation prompt asking if you truly want to execute the DROP TABLE query. Confirm the action. This step is crucial as it clears out the default WordPress tables to make way for your imported data.

Next, go to the Import tab. Click Choose File and select the SQL file you exported with WP Migrate Lite. Ensure the character set and other options are correct (usually the default is fine). Click Import to begin the import.

If using WP-CLI, SSH into your new hosting environment and navigate to your new WordPress installation’s root directory. Ensure your wp-config.php file has the correct database credentials for the new database. Then, run the command: wp db import /path/to/your/downloaded/database.sql (remember to replace /path/to/your/downloaded/database.sql with the actual path to your SQL file, which you’d need to upload via SFTP first). This command will automatically drop existing tables and import your new data.

Manually Transfer Files to Your New Domain

With the database imported, the final step for WP Migrate Lite is to transfer your themes, plugins, and media files to the new domain.

Extract the contents of the ZIP file you downloaded from WP Migrate Lite. This will give you a “wp-content” folder and potentially other root WordPress files. Using an FTP or SFTP client, connect to your new hosting environment and navigate to the root directory of your new WordPress installation.

Upload the wp-content folder from your extracted ZIP file to your new WordPress installation’s root. When prompted, instruct your FTP/SFTP client to overwrite any existing files and folders within wp-content. This will replace the default themes, plugins, and empty uploads folder with those from your old site.

If your old site had custom .htaccess rules, a robots.txt file, or specific modifications to wp-config.php (beyond database credentials), you may need to transfer these files individually from your extracted ZIP’s root directory to the new site’s root. Exercise extreme caution when transferring or merging wp-config.php, as incorrect details will break your site. It is often safer to manually re-add specific customizations to the new wp-config.php rather than replacing the entire file.

Post-Migration Checks and Final Steps

Even with careful execution, some final checks are essential to ensure your site is fully functional on its new domain.

Log in to the new domain’s WordPress admin and navigate to Settings > Permalinks. Without making any changes to the permalink structure itself, simply scroll to the bottom of the page and click the Save Changes button twice. This action flushes WordPress’s rewrite rules, ensuring all your posts and pages are accessible at their new URLs.

Ensure you clear all caches if you had any caching plugins active on your old site, or if your new hosting uses server-side caching. This prevents the site from serving outdated information or getting stuck in redirect loops.

Finally, thoroughly test your new site. Systematically navigate through it, clicking on various posts, pages, and custom post types, testing all navigation menus, checking all images and media files, submitting forms, and verifying plugin functionalities.

Once you are completely satisfied that your site is working perfectly on the new domain, update your domain’s DNS records to point to your new hosting environment’s server. This is the final step that makes your new domain the primary live address for your website. DNS propagation can take up to 24-48 hours.

If your old domain was previously indexed by search engines and you wish to preserve SEO value, it is highly recommended to set up 301 permanent redirects from every URL on your old domain to its corresponding URL on the new domain. This tells search engines that your content has permanently moved.

Streamlining Domain Migrations with WP Migrate

While WP Migrate Lite provides the necessary tools for a successful manual domain migration, the multi-step process involving file transfers, database imports, and manual configurations can be time-consuming and prone to human error, especially for larger sites or frequent domain changes. WP Migrate directly addresses these challenges, offering a highly streamlined and automated workflow that significantly reduces effort and risk.

One advantage of WP Migrate is its direct push and pull functionality for both databases and files. This feature completely bypasses the need for manual download, upload, and import steps. Instead, you establish a secure, direct connection between your source and destination site. From the source site, you can “push” the entire site directly to the new domain, complete with its database, themes, plugins, and media uploads. WP Migrate handles all the underlying complexities, including intelligently performing the necessary URL and path replacements and correctly dealing with serialized data, all in one coordinated operation. This capability dramatically accelerates the migration process and virtually eliminates the risk of errors associated with manual transfers.

WP Migrate’s WP-CLI integration provides a powerful avenue for automation. This means you can initiate and control domain migrations directly from your command line. For those utilizing version control and continuous integration/continuous delivery (CI/CD) pipelines, this allows domain migration steps to be scripted and integrated into automated deployment processes, enhancing efficiency and reliability across your development ecosystem.

Collectively, these premium features transform a potentially tedious and error-prone domain migration into a fast, reliable, and often automated task. By eliminating manual steps and leveraging intelligent, direct site-to-site communication, WP Migrate significantly reduces both the time commitment and the inherent risks involved in moving your WordPress site to a new domain.

Wrapping Up

Relocating a WordPress website to a new domain doesn’t need to be fraught with broken links or lost content. Ensuring a seamless transition where every URL, image, and internal reference correctly points to your new domain is a matter of using the right processes and tools. A systematic approach allows you to confidently manage your WordPress site’s evolution and ensure it thrives on its new home.

Have you migrated a site to a new domain with WP Migrate or another tool? How was the process? Let us know in the comments!

The post Moving WordPress to a New Domain: A Step-by-Step Guide Without Breaking Links appeared first on Delicious Brains.

The Power of Partial Migrations: Syncing Only What You Need

24 July 2025 at 21:32

Managing WordPress sites across different environments often requires moving data and files. A partial migration involves selectively transferring only specific components of your WordPress installation. Instead of cloning an entire site, you might move just new database entries, an updated theme, or recently added media.

In this article, we look at the intricacies of partial migrations and explore practical scenarios where syncing only what you need can save significant time, prevent workflow disruptions, and streamline deployments.

What Are Partial Migrations?

The traditional approach of moving an entire website, a “full site migration,” involves copying every file and database entry. While necessary for initial deployments or major overhauls, this method can be inefficient and risky for ongoing development.

This is where partial migrations become essential. Instead of an all-encompassing transfer, a partial migration is the selective movement of specific components. This might involve targeting individual database tables, such as the wp_posts table to deploy new articles, or moving only new media uploads, an updated theme, or a single plugin.

The benefits of this granular approach are substantial. First, limiting the scope of the transfer reduces data volume, which translates to faster operations and less server load. Second, partial migrations minimize the risk of inadvertently overwriting critical data or configurations that may have diverged between your environments. This prevents unwanted regressions and simplifies troubleshooting. Finally, it enables truly targeted updates, allowing you to deploy isolated changes confidently, knowing you are only affecting the intended components of your site.

How to Perform Partial Migrations

WP Migrate Lite provides a straightforward interface for executing granular exports. While the subsequent import or file transfer steps are manual, the plugin significantly simplifies the data extraction process. Here, we’ll walk through common partial migration scenarios, detailing how to configure WP Migrate Lite for each.

To begin, ensure WP Migrate Lite is installed and activated on your source WordPress site, and then navigate to Tools > WP Migrate.

Scenario 1: Syncing New Content

This scenario is common when new articles, landing pages, or product entries are developed on a staging site and need to be published to a live production environment without affecting other data.

Navigate to the Export Tab

In your source site’s WordPress admin, access WP Migrate Lite’s interface. From there, select the Migrate tab and then click Export.

The Migrate tab in WP Migrate Lite, showing various options including "Export."

Configure the Export

WP Migrate defaults to a database export, without exporting WordPress core, media files, etc. Leave the “Database” checkbox checked, and then click the Tables dropdown.

In the Tables section, click Export only selected tables below, and then carefully select only the tables relevant to your content. At a minimum, this includes wp_posts (assuming wp_ is your table prefix). If your content utilizes custom fields, you should also select wp_postmeta. For new content involving categories or tags, ensure wp_terms, wp_term_relationships, and wp_term_taxonomy are also chosen. It is important to avoid tables like wp_users, wp_options (unless specific modifications are intended), or unrelated plugin tables to prevent unintended overwrites.

Configure Find and Replace

A crucial step for maintaining correct internal links and asset paths is configuring a Standard Find & Replace function. The “Find” fields should already contain the relevant URL and file paths of your source site. In the “Replace” field, input the URL of your destination site. This ensures internal links or embedded media URLs within your exported content are accurately updated for the live environment, with WP Migrate Lite intelligently handling serialized data.

Once all configurations are set, click Export. WP Migrate Lite will then process the selected tables, execute the find and replace operations, and generate a SQL file.

WP Migrate Lite's Find & Replace function.

Manual Import

After downloading the generated SQL file, the next step is manual import. You will need to access your destination site’s database using a tool such as phpMyAdmin or through a command-line interface like WP-CLI. Import the SQL file into the destination database. Exercise caution if your new content might have conflicting IDs with existing content on the destination site. This method is generally most suitable for importing entirely new content.

Scenario 2: Synchronizing Media Library Additions

When new images, videos, or documents are uploaded to a development or staging environment and need to be moved to production, you can transfer only the new files and their associated database entries.

In your source site’s WP Migrate Lite interface, navigate to the Migrate tab and click Export.

Select Media Files Only

Select Media Uploads. This instructs the plugin to include only the contents of your wp-content/uploads directory in the export package. Within the “Media Uploads” options, you’ll be presented with choices for which files to copy. For synchronizing additions, you will typically choose Export new and updated media uploads. This option intelligently identifies and includes only those media files that have been added or modified since your last sync.

Alternatively, if you need to transfer media uploaded after a specific point in time, you could select Export media uploads by date and provide the exact date. This instructs the plugin to include only the contents of your wp-content/uploads directory in the export package based on your selection.

Configuring media exports in WP Migrate Lite.

Configure Database for Media

In the Database section, choose Export only selected tables below. Media items also have corresponding entries in the database. In the “Post Types” subsection, select Export only post types selected below, and then choose attachment from the list. This ensures that only the database entries specifically related to your media library items (found within wp_posts and wp_postmeta) are exported. You will also want to ensure wp_posts and wp_postmeta tables are selected under the “Tables” section.

Configure Find and Replace

As with content, set up Find and Replace rules to update URLs from your source site to your destination site (e.g., https://staging.example.com to https://www.example.com). This step is vital to ensure media URLs are correctly reflected in the database.

Start the Export

Click Export. This action will generate a ZIP file that contains both the selected media uploads and the accompanying SQL database file.

Manual Transfer and Import

Once the export is complete, download the generated ZIP file. Extract the wp-content/uploads folder from this archive. Using an FTP or SFTP client, manually upload only the new or updated media files and folders to the wp-content/uploads directory on your destination server. Exercise care to avoid inadvertently overwriting existing files unless that is your explicit intention.

Concurrently, import the exported SQL file into your destination database using phpMyAdmin or WP-CLI. This dual action ensures the new media items are both physically present and correctly registered within your WordPress Media Library, making them accessible via the admin interface.

Scenario 3: Deploying a Specific Theme or Plugin Update

Deploying a specific theme or plugin update using a partial migration is particularly useful for custom code or when changes involve database updates, ensuring precise deployment without affecting other site components. When you’ve developed or updated a specific theme or plugin and want to push only those changes, a partial file export is the way to go. This avoids deploying an entire site archive when only one component has changed.

Navigate to the Migrate tab and click Export. In the Files section of the export configuration, select Themes or Plugins, depending on which you want to export,. Then, select only the folder of the theme or plugin you wish to export.

You usually don’t have to include the database as part of this export, unless your theme or plugin update specifically entails database changes that have not been managed separately. If database modifications are necessary, you would combine this file transfer with a corresponding selective database export and import process, as outlined in Scenario 1 or 2.

Finally, click the Export button to generate a ZIP file containing only the selected theme or plugin folder, and any database tables you’ve determined are needed.

Manual Transfer

Download the generated ZIP file, and extract the specific theme or plugin directory from within this archive. Then, utilizing an FTP or SFTP client, manually upload this extracted directory to the corresponding wp-content/themes or wp-content/plugins directory on your destination server. This action will typically overwrite the existing folder. It is always prudent to create a backup of the destination theme/plugin before proceeding.

Elevating Partial Migrations with Greater Capabilities

While WP Migrate Lite provides effective tools for granular exports, its capabilities are confined to the source site. The process of integrating those exports into a destination environment consistently requires manual effort. This reliance on manual download, upload, and import steps—whether for database files via phpMyAdmin or file transfers via FTP—quickly becomes a bottleneck for professional workflows.

This manual overhead significantly reduces efficiency for frequent synchronizations, particularly when dealing with large sites or complex data. It also prevents the automation crucial for modern development pipelines and lacks the direct bidirectional syncing needed to pull fresh data from a live site to a development environment. For occasional, simple exports, WP Migrate Lite is functional, but the limitations of manual processes become apparent when speed, automation, and integrated workflows are required.

When the demands of your workflow exceed the manual capabilities of WP Migrate Lite, WP Migrate offers a comprehensive solution. It transforms partial migrations into a direct, automated process, providing granular control and efficiency.

The core enhancement is its direct push and pull feature, allowing seamless, secure database and file transfers between WordPress sites without manual intermediate steps. This includes precise file synchronization, enabling direct transfer of only new or updated media, themes, or plugins through intelligent comparison of source and destination files. For WordPress Multisite networks, it provides specialized tools that simplify complex tasks like exporting individual subsites or migrating them between networks. Command-line interface integration via WP-CLI allows developers to script partial migrations, integrate them into CI/CD pipelines, and automate routine synchronization tasks.

To further streamline recurring operations, migration profiles can be saved, enabling quick, consistent execution of predefined partial migration settings.

Wrapping Up

A partial migration involves selectively transferring only specific components of your WordPress installation. Instead of cloning an entire site, you can now move just new database entries, an updated theme, or recently added media. This strategic approach to moving data and files is key for managing WordPress sites efficiently across different environments.

While partial migrations have their intricacies, there are scenarios where syncing only what you need can save significant time, prevent workflow disruptions, and streamline deployments. WP Migrate saves even more time by automating the steps you need to do manually when using WP Migrate Lite.

The post The Power of Partial Migrations: Syncing Only What You Need appeared first on Delicious Brains.

Merging WordPress Sites: Consolidating Multiple Installs into a Multisite Network

18 July 2025 at 18:46

WordPress Multisite is a powerful tool, highly useful for things like client sites managed by an agency, school or university departments, or large corporate structures where many related sites are needed. However, moving existing standalone sites into that network can be a real headache, with tricky database merges and file juggling.

In this article, we look at two ways to approach this migration: the manual way with a bit of assistance from WP Migrate Lite, and the practically automatic way with WP Migrate.

What is WordPress Multisite?

Multisite is a WordPress feature that allows you to run multiple independent WordPress websites from a single WordPress installation. It allows you to:

  • Manage everything centrally: Handle core updates, themes, and plugins for your entire network from one admin dashboard.
  • Share resources: Themes and plugins can be installed once and activated across multiple sites within the network.
  • Streamline user management: Users can often have accounts across different sites in the network.

Subdomains vs. Subdirectories

A critical choice you’ll make when setting up your multisite network is how the URLs for your individual subsites will be structured.

  • Subdomains: Your subsites will appear as subdomains of your main network domain (e.g., site1.yourdomain.com, site2.yourdomain.com). This often requires your web host to support “wildcard subdomains” and can involve specific DNS configurations.

  • Subdirectories: Your subsites will appear as subfolders of your main network domain (e.g., yourdomain.com/site1, yourdomain.com/site2). This typically relies more on .htaccess rules and is often simpler to set up initially on shared hosting.

This decision is made early in the Multisite setup process and is generally very difficult to change later, so choose wisely based on your hosting capabilities and desired URL structure.

Why Converting to Multisite Can Be Complex

Bringing existing single WordPress sites into the multisite fold isn’t a simple drag-and-drop. The biggest challenges are merging database tables, file organizations, and making sure URLs and serialized strings aren’t broken.

  • Database Structure: Single sites use a straightforward set of database tables (e.g., wp_posts, wp_options). Multisite, however, uses global tables (like wp_users and wp_usermeta for the entire network) alongside site-specific tables, each with a unique prefix (e.g., wp_2_posts, wp_3_options). Merging these correctly without data corruption is the biggest hurdle.
  • File Organization: Media uploads in a single site live in a simple wp-content/uploads/ folder. In a multisite, each subsite gets its own dedicated folder, typically wp-content/uploads/sites/[site_ID]/.
  • URLs and Serialized Data: A single site’s database contains its old URL everywhere. When you move it to a multisite subsite, the URL changes. WordPress also stores complex data (like widget settings, theme options) in a serialized format. A simple find-and-replace on these strings can break them, leading to broken functionality.

Setting Up WordPress Multisite

The first thing you need is a functional WordPress Multisite network. We recommend testing everything on a staging site or in local development before rolling it out to production. Creating a [WordPress Multisite in Local(https://localwp.com/help-docs/advanced/wordpress-multisite-with-local/#Creating-a-new-Multisite-in-Local) is one way to get up and running quickly. Local also integrates with WP Migrate, the tool we’re going to use to transfer our database and files.

Next, create complete backups of all your sites, the single sites you plan to migrate and your fresh WordPress install that will become the multisite network. You never know when you’ll need a backup.

Migrating a Single Site to Multisite the Hard Way

This section outlines the process of converting a single WordPress site into a multisite subsite with a heavy reliance on manual effort. While WP Migrate Lite can help with providing a raw database export, the vast majority of the complex, multisite-specific adjustments will fall squarely on your shoulders.

Preparing the Source Site

Before you begin extracting data, it’s always a good practice to prepare your source site. A clean database will make things slightly less chaotic down the line. We recommend first taking the time to clean up your database by deleting unnecessary data like spam comments, old post revisions, expired transients, and any unused themes or plugins. This can be done directly in your database via a tool like phpMyAdmin or by using a dedicated cleanup plugin.

Once your database is tidied up, you’ll need to export its contents. Install and activate WP Migrate Lite on your single WordPress site, navigate to Tools > WP Migrate, and then click on the Migrate tab. Next, click on Export. From there, you have options to export just the database, or perform a “Full-Site Export” which bundles your database, media uploads, themes, plugins, and other wp-content files into a downloadable ZIP archive.

The Export settings in WP Migrate Lite, allowing you to export the database, the whole site, or any portion thereof.

While WP Migrate Lite does offer a “Find & Replace” feature that can safely handle serialized data for general site moves (e.g., changing http://olddomain.com to http://newdomain.com when moving a single site to a new domain), for this specific Multisite scenario, you’ll ultimately need to access the raw .sql file for intricate manual editing. Whether you export just the database or a full site ZIP, you’ll then proceed to the next, most challenging step.

Manual Database Transformation

This is where the real challenge begins, and where even a single misstep can lead to a completely broken site. You’ll be working directly with the raw SQL file that contains your site’s database, so it’s absolutely crucial to have a fresh backup of that file before you start. For this intricate process, you’ll need a powerful text editor, like VS Code, Sublime Text, or Notepad++, that can handle large files and perform advanced find-and-replace operations.

The first major task involves manually adjusting your database table prefixes. Your single site’s database tables likely started with wp_ (for example, wp_posts, wp_options). In a Multisite environment, each subsite needs a unique prefix, typically wp_[subsite_ID]_ (such as wp_2_posts or wp_3_options). You must go into your database’s .sql file and meticulously perform a global find-and-replace for every instance of your old table prefix, replacing it with the new subsite’s prefix.

Now, here’s the huge, critical risk: while WP Migrate Lite’s built-in find-and-replace can handle serialized data safely when you’re just changing URLs within a single site context, it is not designed to automatically adapt serialized data for the complex table prefix changes required when moving a single site into a multisite subsite. WordPress stores complex data, like widget settings, plugin options, and various array data, in a serialized format. If you perform a simple text replacement on a serialized string that changes its length, you will corrupt that data. This often results in broken widgets, non-functional plugins, and missing settings on your new subsite, as standard text editors don’t understand the intricacies of serialized data lengths.

Following the prefix changes, you’ll face a similar challenge with URLs and paths. Your exported database is littered with references to your old single site’s URL. You’ll need to perform another series of global find-and-replace operations to update all these instances to reflect your new subsite’s URL (like http://multisite.com/subsite1 or http://subsite1.multisite.com). Be sure your target URL matches your multisite’s chosen structure, whether it’s http://multisite.com/subsite1 for subdirectories or http://subsite1.multisite.com for subdomains.

Once more, the danger of corrupting serialized data that contains these URLs looms large if you’re not using a specialized tool designed for these complex, length-sensitive replacements across various database structures within a multisite context.

Next comes the particularly thorny issue of user data merging. Multisite utilizes global wp_users and wp_usermeta tables, meaning all users across the entire network share these two tables. Your single site, of course, has its own dedicated wp_users and wp_usermeta tables. You absolutely cannot just import these directly.

Instead, you’ll need to carefully export only the user tables from your single site. Then, you must manually review them. If any user IDs from your single site conflict with existing user IDs on your multisite network, you’ll have to manually reassign new, unique IDs to the single site’s users within their wp_users and wp_usermeta rows. After that, these modified user rows must be meticulously merged into the Multisite’s global wp_users and wp_usermeta tables.

Finally, and this is a step that often requires writing complex custom SQL queries, you’ll need to update the post_author fields in your newly prefixed wp_X_posts table to ensure they correctly reference the new user IDs in the Multisite’s global wp_users table. Beyond these major structural changes, you might also find yourself manually adjusting site_id values in certain option tables to ensure everything correctly points to the new subsite.

Importing the Modified Database

Once you’ve painstakingly edited your SQL file, and double-checked (and triple-checked!) your work, it’s time to import it. It’s important to note that WP Migrate Lite does not provide an in-dashboard import feature for arbitrary SQL files or full-site ZIP archives back into a live WordPress site; its export is designed to be imported using external tools (or specifically into Local). Therefore, you’ll typically use a database management tool like phpMyAdmin. Log in, select the database associated with your multisite installation, and then use the “Import” function to upload your manually edited SQL file. This is often the moment of truth, where you’ll be hoping no errors appear.

Manual File Transfer and Reorganization

With the database n place, your next major task is to sort out the files. Even if you generated a full-site export ZIP with WP Migrate Lite, the manual database edits mean you’ll likely still be managing files externally.

First, connect to your multisite via FTP/SFTP. Navigate to the wp-content/uploads/ directory. You’ll notice a sites/ folder there, and inside sites/, you’ll find folders named after your subsite IDs (e.g., 2/, 3/). You’ll then take all the media files from your single site’s wp-content/uploads/ folder and manually upload them into the correct subsite’s designated directory (e.g., wp-content/uploads/sites/[subsite_ID]/). Even after moving the files, they might not immediately appear in your subsite’s media library. You might need to activate a specific plugin on the subsite to rescan and register these files in its database.

Beyond media, you’ll also need to manually upload any specific themes or plugins that your old single site used, if they aren’t already available network-wide on your multisite. Once uploaded, you’ll then activate the necessary themes and plugins for your new subsite from its dashboard.

Post-Migration Cleanup and Testing

Even if you’ve done everything perfectly, you need to thoroughly check the newly migrated subsite. Begin by clearing any caching plugins on your multisite, as well as any server-side or CDN caches. After that, go to the new subsite’s dashboard, navigate to Settings > Permalinks, and click Save Changes. This can often help re-write the permalink rules for the subsite and resolve potential routing issues.

Now comes the most critical part: extensive testing. Do not assume everything works just because the site loads. You must systematically visit all pages and posts to check that content displays correctly, images load, and all internal links function. Test any forms present on the site, verify that widgets and customizer settings are as expected, and ensure all plugins are functioning without errors. Crucially, test user logins and permissions on the new subsite, and double-check that all media links are correct and images display properly.

As you can see, performing this migration manually is a monumental undertaking. Even with a tool like WP Migrate Lite assisting with the initial database export and its general serialized data handling, the lack of specific multisite integration means you’re left with immensely complex manual tasks. It demands deep technical expertise, meticulous attention to detail, and a significant time investment for each and every site you plan to migrate. The risk of data corruption, especially with serialized data after table prefix and URL changes, and the complexities of merging user tables, remains extremely high. While it’s technically possible, it’s impractical for most, and certainly not scalable if you have more than one or two sites to migrate.

Simplify Your Life: Migrating a Single Site to Multisite with WP Migrate

This method leverages WP Migrate’s powerful premium features, specifically its “Multisite Tools” addon, to automate the most complex and error-prone aspects of migrating a single site into a multisite network. You’ll quickly see a dramatic reduction in the time, effort, and technical expertise required.

Install WP Migrate

The first thing you’ll need is a “Plus” or “Premier” license for WP Migrate, as these licenses include Multisite Tools.

Once you have your license, install and activate the WP Migrate plugin on both your source single WordPress site and your destination Multisite network. This dual installation allows the plugin to establish a secure connection between the two sites, enabling direct data transfer.

Prepare Your Source Site

Compared to the arduous manual method, source site preparation here is significantly simpler. While a general cleanup (like deleting spam comments or old revisions) is always good practice for a leaner migration, WP Migrate’s robust capabilities mean you don’t need to manually export databases or files. The plugin intelligently handles the find-and-replace for URLs and file paths, safely managing all serialized data without corruption.

Prepare the Destination Multisite

The foundational steps of setting up your WordPress Multisite network are still essential. You’ll need to have your multisite environment properly configured and running. Additionally, just as with the manual method, you’ll need to create a new, empty subsite within your multisite network that will serve as the destination for your incoming single site. This provides WP Migrate with the designated slot to pull your site’s data into.

Perform the Automated Pull Migration

This is where WP Migrate truly shines, automating tasks that were previously hours of painstaking manual labor. From your Multisite Network Admin dashboard:

  1. Navigate to the WP Migrate plugin interface.
  2. Select the “Pull” option. This tells the plugin you want to pull data from a remote site to your current multisite network.
  3. You’ll then be prompted to connect to your remote source site (your original single WordPress installation). Once connected, WP Migrate will intelligently detect your multisite setup.
  4. The plugin will offer you precise options for the migration. You’ll be able to select the specific single site you want to pull from, choose the newly created subsite on your multisite network as the exact destination for this migration, and select which components you wish to migrate: the database, media files, themes, and plugins.
  5. With your selections made, you’ll initiate the migration. WP Migrate then takes over, performing a series of automated, complex tasks. It intelligently handles the find-and-replace for URLs and file paths, safely managing all serialized data without corruption. The plugin also correctly adjusts all database table prefixes from your single site to match the unique prefix of the target subsite (e.g., wp_ becomes wp_2_). It also merges your single site’s user data into the multisite’s global wp_users and wp_usermeta tables, correctly handling user ID assignments and references. Media files directly to the correct subsite-specific wp-content/uploads/sites/[subsite_ID]/ directory, and it even transfers your selected themes and plugins, making them available for activation on your new subsite.
  6. You can monitor the progress of the migration directly within the WP Migrate interface, which provides clear feedback as it processes your data.

Post-Migration Testing is Still Important

Even with the automation provided by WP Migrate, thorough testing remains a critical step. While the likelihood of fundamental errors is drastically reduced, it’s always wise to verify everything works as expected.

  • Clear Caches: As always, clear any caching plugins on your Multisite, along with server-side and CDN caches.
  • Resave Permalinks: Navigate to your new subsite’s dashboard (Settings > Permalinks) and click Save Changes. This helps ensure the permalink structure is correctly refreshed within the multisite environment.
  • Comprehensive Testing: Systematically check all aspects of your newly migrated subsite. Visit all pages and posts, verify images and media links, test forms, ensure widgets and customizer settings are correct, and confirm that all plugins are functioning as intended.

Comparing Methods

The contrast between the two methods is stark. The second way, powered by WP Migrate, transforms a labor-intensive, technically precarious process into a few clicks. What could take hours or even days of manual debugging and highly specialized knowledge is condensed into minutes, with a dramatically lower risk of error and data corruption. This powerful automation means less stress, more reliability, and ultimately, a much more efficient use of your time.

Wrapping Up

We’ve explored two distinct paths for migrating a single WordPress site into a multisite network. On one hand, the meticulous manual approach demands deep technical knowledge and carries a high risk of data corruption. On the other, a specialized tool transforms this complex process into an efficient and reliable operation.

The difference in effort and risk is striking. What could be a multi-day debugging nightmare becomes a matter of a few clicks, drastically reducing your time and stress.

This contrast clearly highlights a choice: tackle an incredibly intricate task with painstaking manual effort, or leverage automation designed to handle its complexities safely. For most, the investment in a solution that provides such efficiency, reliability, and peace of mind is invaluable.

The post Merging WordPress Sites: Consolidating Multiple Installs into a Multisite Network appeared first on Delicious Brains.

Delicious Brain Bytes: WordPress Set for Another Major Release in 2025

10 July 2025 at 15:45

In this issue of Delicious Brain Bytes, we look into recent and upcoming WordCamps, discuss the upcoming release of WordPress 6.9, and much more!

WordCamp Wrap-Up: Europe Recap, US on the Horizon

WordCamp Europe’s 2025 Contributor Day was particularly fruitful, welcoming five new Core contributors to the project and fixing four key tickets. The event took place in Basel, Switzerland, from June 5-7. Sessions covered a diverse range of topics, from content strategy to AI, with all talks now available on WordPress.tv. You can find a full recap of WordCamp Europe 2025 here.

Two more WordCamps are set for July: WordCamp Masaka on July 18-19 in Masaka, Uganda, and WordCamp Nicaragua on July 26 in Managua, Nicaragua.

WordCamp US 2025 takes place August 26-29 in Portland, Oregon, at the Oregon Convention Center. The event kicks off with Contributor Day on August 26, followed by three days of main conference sessions.

Attendees can expect a comprehensive program covering the latest trends, skills, and strategies in web development, blogging, and site building, alongside opportunities for in-person networking, and a Showcase Day for innovative WordPress projects. WordCamp US is expected to draw between 1200 and 2000 attendees, offering a prime chance to connect with influential figures and contribute to the future of WordPress. Learn more about WordCamp US 2025 here.

WordPress 6.9 Now Scheduled for 2025

WordPress 6.9 is now scheduled for 2025, although most of the dates still read “TBD.” This is a recent change, with all dates previously showing as 2026. A new cadence for WordPress releases was announced in April, reducing the number of major releases from three per year to one. This year will see two major releases, but no official update to this policy has been made at this time.

The next minor release for WordPress is 6.8.2, currently available as a Release Candidate. The release is primarily focused on bugfixes introduced in 6.8. The WordPress 6.8.2. final release is scheduled for July 15, 2025.

A screenshot of the roadmap for WordPress 6.9. While most dates read "TBD", they're all set for 2025.

Installing Adblock on Your Face

Tired of visual clutter and relentless advertising in the real world? Stijn Spanhove, a Belgian software engineer, has unveiled an augmented reality app for Snap’s fifth-generation AR Spectacles that acts as a real-world adblocker. Using Google’s Gemini AI, the app identifies and obscures advertisements, billboards, and product branding, replacing them with a simple red square showing the name of the advertiser. It also seems to work on any object that’s sufficiently ad-like, such as cereal boxes and soda cans.

️ I've been building an XR app for a real-world ad blocker using Snap @Spectacles. It uses Gemini to detect and block ads in the environment.

It’s still early and experimental, but it’s exciting to imagine a future where you control the physical content you see. pic.twitter.com/ySkFfF6rxS

— Stijn Spanhove (@stspanho) June 19, 2025

FAIR Package Manager: A Decentralized Approach to WordPress Software Distribution

A new open-source initiative, the FAIR Package Manager, has emerged with the goal of rethinking how software is distributed and managed within the WordPress ecosystem. FAIR, which stands for Federated And Independent Repositories, aims to offer a decentralized alternative to the WordPress.org plugin and theme ecosystem.

The FAIR Package Manager operates as a WordPress plugin designed to replace existing centralized services with a federated, open-source infrastructure. Its core pillars include API replacement, handling services like update checks and event feeds with local or FAIR-governed alternatives, and decentralized package management, introducing a new distribution model for themes and plugins. The project supports opt-in packages using the FAIR protocol, allowing hosts to configure their own repository mirrors.

The FAIR project’s Technical Steering Committee is co-chaired by Carrie Dils, Mika Epstein, and Ryan McCue. The GitHub repository for the FAIR Package Manager is now live and open for contributions.

Unlocking Interactivity: 15 Examples for the WordPress Interactivity API

For WordPress developers looking to build more dynamic and engaging user experiences without relying on complex external JavaScript, Diane Collett’s recent article for WP.Gallery offers a valuable resource. In 15 WordPress Interactivity API examples, Collett showcases the power of the native WordPress Interactivity API, introduced in WordPress 6.5, through a range of practical applications.

Collett highlights how the Interactivity API enables smooth, modern features directly within WordPress blocks. For instance, the native image lightbox allows images to expand into a full-screen overlay on click, creating a professional gallery experience without needing third-party plugins. Similarly, the instant query loop pagination feature supercharges the Query Loop block, letting users browse posts without full page reloads, significantly speeding up navigation. Beyond core blocks, the API also empowers custom interactive elements like carousels and sliders, handling the complex logic required for smooth animations and user navigation between items.

These examples offer just a glimpse into what’s possible with the WordPress Interactivity API. For more inspiration, be sure to check out the full article.

The query loop pagination on the Esusu blog, one of 15 examples on how to use the Interactivity API.

The Hidden Costs of “Easy” Website Builders

Clients who suggest platforms like Wix or Squarespace for a quick and easy website launch may not have considered the long-term implications. Jono Alderson’s recent article, [The long-term cost of short-term platforms](https://www.jonoalderson.com/wordpress/the-long-term-cost-of-short-term-platforms/, offers a compelling argument for why immediate convenience can lead to significant headaches down the road.

Alderson dissects how these “short-term” platforms, while excellent for rapid deployment, are optimized for quick conversion and lock-in, not for evolving business needs or strategic growth. He argues that by abstracting complexity, they often limit flexibility in crucial areas like SEO, data models, and integrations. This can leave businesses hitting a wall when their needs expand beyond a simple brochure site. Alderson concludes that while WordPress might present a steeper learning curve, its open and flexible nature ultimately provides the control and adaptability necessary for businesses to truly grow and differentiate online.

This article is a vital read for any WordPress professional looking to educate clients on the strategic advantages of a more robust, extensible platform. Find Alderson’s full insights here.

The Wild World of Software Bugs: Lessons from History’s Most Bizarre Glitches

Ever wondered about the most absurd software bugs in history? At PyCon US 2025, Mia Bajić, a software engineer and Vice Chair of the EuroPython Society, shared some truly bizarre incidents, reminding us that even the most advanced systems can have hilariously human-sized flaws.

Among the greatest hits was a 2009 Google typo where a single forward slash caused every website (including Google’s own) to be flagged as dangerous. Then there was the NASA Mars Climate Orbiter lost in 1999, which crashed because one team used imperial measurements and another used metric—a $125 million unit conversion error. Bajić also recounted the tale of Steve Null, a Sun Microsystems employee who kept disappearing from databases because older systems couldn’t handle “Null” as a name.

These anecdotes are amusing, but they also highlight critical lessons: test thoroughly, ensure clear communication across systems, and always anticipate the unexpected. For more bizarre bug stories and the valuable lessons they offer, check out Bajić’s talk here.

YouTube cover image

Building a Headless WordPress Chatbot with WP Engine’s AI Toolkit and Google Gemini

Harnessing the power of AI to create intelligent and responsive applications is a growing demand in modern web development. For WordPress professionals working with headless architectures, integrating advanced AI capabilities can unlock new possibilities.

In this article, Francis Agulto shows us how to build a full-stack chatbot that leverages WP Engine’s AI Toolkit, Retrieval Augmented Generation (RAG), and Google Gemini within a Next.js framework, delivering accurate and contextually relevant responses from your WordPress content.

The Plugin Credentials page of WP Engine's Smart Search.

Essential Soft Skills for WordPress Developers

You’re not going to get far in WordPress development without solid technical skills. They’re foundational, allowing you to build, customize, and optimize digital experiences. However, they’re only going to take you so far. Continued success demands a sophisticated suite of soft skills, the interpersonal, communication, and organizational abilities that bridge the gap between technical execution and project triumph.

In this article, we look into these critical, non-coding competencies, exploring why they are just as vital as your development expertise for navigating challenges, fostering client satisfaction, and ultimately accelerating your career growth.

What’s the most interesting news you’ve come across recently? Pop by Twitter and let us know.

The post Delicious Brain Bytes: WordPress Set for Another Major Release in 2025 appeared first on Delicious Brains.

Splitting a WordPress Multisite: Migrating a Subsite to its Own Single Installation

3 July 2025 at 21:01

WordPress multisite networks offer flexibility, but a subsite often needs its own single installation for client needs, scaling, or simplified management. Separating a subsite is complex due to Multisite’s unique database structure, making manual migrations prone to errors, especially with serialized data. In this article, we look at the precise steps to migrate a subsite using WP Migrate Lite, and discuss the advanced automation and time-saving features available with WP Migrate.

The Unique Nature of Multisite Subsite Data

Migrating a subsite isn’t a simple copy-and-paste job because of how WordPress Multisite stores data. Unlike single WordPress installations, a multisite network uses a combination of shared and unique database tables.

  • Shared Tables: The main network (site ID 1) uses standard WordPress tables like wp_options, wp_users, wp_usermeta, wp_posts, etc. These tables often contain data relevant to the entire network or default settings.
  • Unique Subsite Tables: Each subsite within the network has its own set of dedicated tables. These tables are prefixed with wp_X_, where X represents the unique numerical ID of that specific subsite (e.g., wp_2_posts, wp_3_options). These tables hold all the content, settings, and user data specific to that individual subsite.

The importance of precision here cannot be overstated. A successful split demands the careful extraction of only the subsite’s relevant data. This includes its wp_X_ tables and, often, a subset of the wp_users and wp_usermeta tables if you intend to migrate specific users with the subsite. Furthermore, meticulous URL replacement is critical to prevent broken links and corrupted content after the migration.

Attempting this manually with raw SQL exports and basic find-and-replace operations is highly risky. WordPress stores a lot of data in a serialized format. This means simple text replacements can corrupt the data structure, leading to broken widgets, theme settings, and plugin configurations. This is where tools like WP Migrate become invaluable, as they are specifically designed to handle serialized data safely during migrations.

Pre-Migration Checklist: Essential Preparations

Thorough preparation is paramount for any migration. Skipping these steps can lead to data loss or significant headaches down the line.

1. Create a Full Backup of Your Entire Multisite Network

This is the single most crucial step. Before you touch anything, create a complete backup of your entire multisite network. This includes:

  • All Database Tables: Both shared and subsite-specific.
  • All Files: Your wp-content directory (themes, plugins, uploads), core WordPress files, and any custom files (e.g., .htaccess, wp-config.php).

For a full site backup, consider your hosting provider’s backup solutions or a dedicated backup plugin. This backup is your safety net, allowing you to revert if anything goes wrong.

2. Choose Your Destination Environment

Determine where your subsite will live as a single installation. This could be a new hosting provider and domain, a new domain on your existing hosting, or a local development environment like Local. It’s worth noting that Local integrates with WP Migrate.

Ensure your chosen destination meets the minimum WordPress requirements (PHP version, MySQL version, etc.).

3. Create a Fresh WordPress Single Site Installation

On your chosen destination, perform a completely fresh installation of WordPress. It’s critical that this is a clean install, without any existing content, themes, or plugins (other than the default ones). This provides a clean slate for your migrated subsite data.

4. Install WP Migrate Lite on Both Sites

To facilitate the migration, you’ll need WP Migrate Lite installed and activated on your source multisite network, and on the single-site destination.

Having WP Migrate Lite on both ends will enable the smooth export from the multisite and prepare the destination for the incoming data.

Step-by-Step Guide: Migrating a Subsite with WP Migrate Lite

Now that your preparation is complete, let’s dive into the core migration process using WP Migrate Lite.

Exporting the Subsite Database from the Multisite

The first critical step is to accurately export only the necessary database tables from your multisite network.

Access WP Migrate Lite

Log in to your multisite network’s WordPress admin area. Navigate to Settings > WP Migrate to go to the WP Migrate Lite dashboard.

Target the Subsite’s Database Tables

This is the most crucial part of a multisite split. You must select only the tables associated with the specific subsite you are migrating.

To identify your subsite’s unique ID, go to Sites > All Sites. Hover over the subsite you intend to migrate, and its ID will appear in the URL preview (for example, site-edit.php?id=X, where X is the ID).

Finding the site ID in a multisite setup by hovering over the subsite in the WordPress admin. The site ID is displayed in the lower left corner.

Next, return to the WP Migrate interface. Click on the Migrate tab, and then click Export. Open the “Tables” dropdown, and click Export only selected tables below.

WP Migrate defaults to selecting all of the tables. It’s certainly possible to manually deselect all of the tables you don’t want to migrate, but it’s probably easier to just click Deselect All and then select only those tables that begin with wp_X_ (where X is your subsite’s ID). In other words, if your subsite ID is 2, you would select tables like wp_2_posts, wp_2_options, and wp_2_terms.

Additionally, you will typically need to include the main network’s wp_users and wp_usermeta tables if you intend to migrate the existing users of that subsite, and potentially other users, to the new single installation. If you plan to create new users on the destination and only need the subsite’s content, these tables can be omitted.

Selecting the correct database tables in WP Migrate Lite.

Perform Find & Replace for URLs

WP Migrate’s find and replace feature is vital for updating all instances of your old subsite URL to the new single site URL.

In the “Find” field, enter the full URL of your subsite on the Multisite network. This could be a subdirectory (e.g., https://your-main-domain.com/subsite-name/) or a subdomain (e.g., https://subsite.your-main-domain.com/). In the “Replace” field, enter the full URL of your new single site installation, such as https://new-subsite-domain.com/. WP Migrate automatically manages serialized data during this process, ensuring no data corruption occurs.

Configure Export Options

When configuring export options, the plugin will generate an SQL file by default. The “Advanced Options” section provides checkboxes to refine this SQL export. You may choose to Exclude spam comments and Exclude transients to help keep your new database cleaner and reduce its size. The “Compress file with gzip” option will create a smaller .gz archive of your SQL file. The “Replace GUIDs” box is checked by default. GUIDs are typically not changed on live sites, but in the specific case of splitting a subsite from a multisite to a new standalone installation, updating GUIDs is recommended. This ensures the new site’s content correctly references its new domain and maintains its independence from the old multisite structure.

Selecting Advanced Options in WP Migrate Lite.

Initiate Export

Finally, initiate the export by clicking Export. WP Migrate Lite will process the selected tables, generate an SQL file, and download it to your local machine. This file contains all the database content for your subsite, pre-processed with the new URLs.

Preparing and Importing into the New Single Site

With your subsite’s database exported, the next step is to prepare your new single WordPress installation and import the data.

Access New Site’s Database

Log into phpMyAdmin or your hosting provider’s equivalent database management tool for the new, fresh single WordPress installation. Ensure you are connected to the correct database associated with your new site.

Clear Existing Tables

This is a critical step. Before importing your subsite’s data, you must clear the existing tables in the new database. Proceed with extreme caution here, as this will permanently delete all data in the selected database. Select all tables in the new single site’s database (which are typically prefixed with wp_) and use the “Drop” or “Delete” function to remove them. This creates a clean slate for the incoming subsite data.

Import and Verify

The exact method you use to do this will depend on the tool you’re using and/or your host.

After the import is complete, briefly browse the tables in your new database. You should now see the subsite’s tables (which WP Migrate automatically re-prefixes to the standard wp_ during export) present, containing your subsite’s content.

Migrating Media Files, Themes, and Plugins

WP Migrate Lite gives you the option of exporting your media files, themes, plugin and WordPress core files from within the dashboard. However, in the specific case of splitting a site off of a multisite install, transferring your media files, themes, and plugins requires manual steps when using the Lite version. This approach ensures precise control over the subsite’s specific assets and avoids potential complexities that can arise when using the full site export functionality for a multisite split.

WP Migrate allows you to use .gitignore patterns to exclude specific files from a migration, however this won’t transform the file paths from a multisite structure to a single site structure during export.

For a multisite subsite, manually transferring ensures you correctly extract only the subsite’s media (from its unique wp-content/uploads/sites/X/ directory) and place it in the standard wp-content/uploads/ directory of the new single site. Similarly, while WP Migrate Lite allows for the selection of individual themes and plugins for export, ensuring their seamless integration and correct pathing after a subsite split is best achieved by installing fresh copies or manually placing them.

Media Files

Your subsite’s media files are stored in a specific location within the multisite’s wp-content/uploads/ directory. To transfer these, connect to your multisite network via FTP or SFTP.

Navigate to the wp-content/uploads/sites/X/ directory, where X represents your subsite’s unique ID. Download the entire contents of this sites/X/ folder to your local machine.

Once downloaded, connect to your new single site via FTP or SFTP. Upload the previously downloaded media files directly into the wp-content/uploads/ directory on the new site. The sites/X/ structure is no longer necessary in a standard single site installation.

Themes

First, identify the theme that was active on your subsite within the multisite network. The most reliable method for transferring this is to install a fresh copy of the same theme directly onto your new single site through the WordPress admin interface. If the theme is custom, you will need to download the theme folder from wp-content/themes/ on your multisite and then upload it to wp-content/themes/ on your new single site. After the theme is successfully transferred to your new site, activate it from the Appearance > Themes section of the WordPress admin.

Plugins

Begin by making a comprehensive list of all plugins that were active on your subsite in the multisite network. Similar to themes, the best practice is to install fresh copies of these plugins directly on your new single site. For any custom or premium plugins, download their respective folders from wp-content/plugins/ on your Multisite and then upload them to wp-content/plugins/ on your new single site. Once installed, activate the necessary plugins from the “Plugins” section of your new WordPress admin.

Post-Migration Steps

After the database and files are in place, a few final steps are necessary to ensure your new single site functions correctly.

Re-Save Permalinks

This is a crucial step to refresh WordPress’s rewrite rules. Log into the new single site’s WordPress admin, go to Settings > Permalinks, and click Save Changes. You don’t need to make any actual changes to the permalink structure, just saving it will regenerate the .htaccess file or the equivalent rules for Nginx.

Thorough Testing

Dedicate time to comprehensively test your newly migrated site. Browse all pages and posts to ensure content displays correctly. Check all internal links, images, and embedded media to confirm they point to the new domain. Test forms, comments, and any custom functionality specific to your subsite, and verify user logins and roles.

Delete Old Subsite

Once you are absolutely confident that your new single site is fully functional and stable, you can safely delete the original subsite from your Multisite network. This step should only be performed after extensive testing and confirmation that the migration was successful.

Streamline and Automate with WP Migrate

WP Migrate Lite gives you a good foundation for splitting a multisite subsite, but WP Migrate makes the entire process practically painless with time-saving features and powerful automation that are invaluable for professional developers and agencies. These premium advantages transform a multi-step manual process into a streamlined, often one-click, operation.

One-Click Subsite Push/Pull

This is arguably the most significant game-changer offered by WP Migrate Pro, specifically through its Multisite Tools. .

Instead of manually exporting a database, clearing tables, importing, and then separately transferring files via FTP, WP Migrate allows you to directly “push” a subsite from your network to a fresh single site installation. Conversely, you can also “pull” a single site into a subsite on your network.

This functionality automates the entire database and file transfer process between the two sites, eliminating the need for tedious manual FTP operations for media, themes, and plugins. It intelligently handles all the underlying complexities, including serialized data, making the migration incredibly efficient and less prone to human error.

Automated File Migration

Beyond the database, WP Migrate seamlessly handles the comprehensive transfer of all associated files. This means your media library, active themes, and installed plugins are migrated directly between your multisite and the new single installation. This automated file handling negates the need for manual downloading from wp-content/uploads/sites/X/ and re-uploading to the new site’s wp-content/uploads/ directory, saving substantial time and ensuring all assets are correctly linked and available on the new standalone site.

WP-CLI Integration for Scripting

For developers who manage numerous migrations or integrate them into their deployment workflows, WP Migrate’s WP-CLI integration is a powerful asset. This allows you to execute and automate the entire migration process from the command line. You can script complex migration routines, making it incredibly efficient for repetitive tasks, continuous integration, or managing large-scale deployments without needing to interact with the WordPress admin interface.

Granular Control and Targeted Migrations

WP Migrate offers even finer control over your migrations. While WP Migrate Lite allows table selection, the premium version provides more advanced options for precisely including or excluding specific database tables and even particular post types. This granular control is especially useful for complex scenarios where you only need to migrate a subset of data, ensuring your new single site is as lean and optimized as possible from the outset.

Wrapping Up

Splitting a subsite from a multisite network is more straightforward with the right tools. WP Migrate Lite provides the essential functionality for database export, intelligent URL replacement, and manual file transfer.

For professional developers and agencies, the premium version, WP Migrate, offers much greater automation and efficiency. Its one-click push/pull capabilities, automated file migration, WP-CLI integration, and granular control over data ensure that even the most challenging multisite splits become seamless operations.

Have you split off part of a multisite into a single-site installation? How did it go, and which tools did you use? Let us know in the comments!

The post Splitting a WordPress Multisite: Migrating a Subsite to its Own Single Installation appeared first on Delicious Brains.

❌
❌