WP Manifestindependent plugin directory
manifest / unclassified / spoko-external-media-directory

SPOKO External Media Directory

Changes WordPress media upload directory to external location and optimizes media library performance

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/spokospace/spoko-external-media-directory/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that uploads media files to an external FTP server and serves them from a custom URL.

Features

  • FTP Upload: Automatically uploads media files to an external FTP server
  • Custom Media URL: Serve media from a custom domain with optional directory prefix
  • Image Optimization: Automatic WebP and AVIF variant generation
  • Media Library Performance: Pagination and lazy loading for large media libraries
  • SSL/TLS Support: Secure FTP connections (FTPS)
  • Connection Testing: Built-in FTP connection test button

Requirements

  • WordPress 5.0 or higher
  • PHP 8.3 or higher
  • FTP extension enabled in PHP

Installation

  1. Download or clone this repository to your wp-content/plugins/ directory
  2. Activate the plugin in WordPress admin
  3. Go to Settings → External Media to configure

Configuration

FTP Settings

Setting Description
FTP Host FTP server hostname (without ftp:// prefix)
FTP Username FTP login username
FTP Password FTP login password
FTP Port Server port (default: 21)
Remote Path Directory path on FTP server where files will be uploaded
Use SSL/TLS Enable FTPS secure connection
Use Passive Mode Recommended for most servers

Media URL Configuration

Setting Description
Media URL Public URL where uploaded media is accessible (e.g., https://cdn.example.com)
URL Directory Optional directory prefix (e.g., blog → cdn.example.com/blog/...)

Image Optimization

Setting Description
Enable WebP Create WebP variants of uploaded images
Enable AVIF Create AVIF variants of uploaded images

How It Works

  1. When you upload a file in WordPress, it's first saved locally
  2. The plugin uploads the file to your FTP server
  3. WordPress stores the external URL in the database
  4. Media is served from your custom domain

Example Configuration

FTP Settings:

  • Host: ftp.example.com
  • Path: /public_html

Media URL:

  • URL: https://cdn.example.com
  • Directory: blog

Result: https://cdn.example.com/blog/2024/01/image.jpg

License

GPL v2 or later

Author

spoko.space