Menu adicional

Obtenha o MemberPress hoje mesmo! Comece a ser pago pelo conteúdo que você cria! Obtenha o MemberPress agora

How To Configure API CDN in MemberPress App

Content Delivery Networks (CDNs) improve app performance by serving media files through globally distributed edge servers. This approach reduces server load and accelerates content delivery for users worldwide. This document explains how to enable API CDN, configure CDN settings, and optimize media delivery within the MP App.

Understanding API CDN

API CDN routes media files such as images, documents, and videos through CDN servers rather than the WordPress hosting server. The first request uploads media to the CDN, and subsequent requests serve content from the CDN domain. This process reduces latency and improves load times for app users.

Pré-requisitos

Before configuring API CDN, ensure the following requirements are met:

  • MemberPress App plugin installed and activated;
  • Active CDN service account (CloudFront, StackPath, BunnyCDN, or similar provider);
  • CDN base URL obtained from the CDN service provider;
  • WordPress admin access to manage plugin settings.

Enabling API Performance Component

The API Performance component must be activated before CDN configuration can begin.

  1. Navegue até Dashboard > MP App > Components.
  2. Locate API Performance in the components list.
  3. Clique em Ativar..

The API Performance component provides optimization features, including CDN integration and caching capabilities.

Configuring CDN Settings

CDN configuration requires the base URL provided by the CDN service provider.

  1. Navegue até Dashboard > MP App > Settings > API CDN.
  2. Verifique o Enable API CDN caixa de seleção.
  1. Enter the CDN base URL in the CDN Base URL field without a trailing slash.
  1. Clique em Salvar alterações.

Example CDN base URLs:

  • CloudFront: https://d123456789abcd.cloudfront.net;
  • StackPath: https://cdn.example.stackpathcdn.com;
  • BunnyCDN: https://example.b-cdn.net.

Observação: The CDN base URL must match the domain configured within the CDN service dashboard.

Understanding CDN Media Delivery

API CDN processes media requests through a two-stage delivery system that optimizes performance after initial setup.

First Request Process

When a user first requests media content, the following sequence occurs:

  1. The app sends a request to the WordPress site for the media file.
  2. The WordPress site retrieves the media from local storage.
  3. The media file uploads to the CDN automatically.
  4. The CDN returns the media to the user.

This initial request may experience standard loading times as media uploads to the CDN.

Subsequent Request Process

After the initial upload, future requests follow an optimized path:

  1. The app requests media directly from the CDN domain.
  2. The CDN serves the cached media from the nearest edge server.
  3. Users receive faster load times through proximity-based delivery.

The CDN caches media files according to the cache duration settings configured within the CDN service.

Optimizing Performance with API Caching

API Caching complements CDN functionality by reducing database queries and accelerating API response times. Combining both features maximizes app performance.

  1. Navegue até Dashboard > MP App > Settings > API Caching.
  1. Configure cache settings based on content.
  1. Clique em Salvar alterações.

Caching settings should balance performance gains with content freshness requirements. Review the API caching configuration guide for optimization strategies.

Este artigo foi útil?

Artigos relacionados

garota do computador

Obtenha o MemberPress hoje mesmo!

Comece a ser pago pelo conteúdo que você cria.