How to move media to a subdomain
- Create the subdomain on your host
files.sitename.com
for example - Download ALL the old media files from your WordPress
/wp-content/uploads
folder via FTP - Upload ALL the media files to your new subdomain
- Change your Upload folder to the subdomain in your WordPress settings
You may need to type /wp-admin/options.php
in the URL bar and scroll down to upload_path
and upload_url_path
as this menu option is not visible in the WordPress menu.
upload_path
: directory root for subdomain- set it to
/home/server_root/sitename/folder
- Echo the following from an
index.php
file at the site root to find your directory root path:<?php echo $_SERVER["DOCUMENT_ROOT"]; ?>
- Mine is
/home/server_root/sitename/media
- set it to
upload_url_path
: actual URL path for the subdomain- Mine is
https://files.sitename.com/media
- Mine is
Change your Live Image URLs with velvet blue plugin
Taken from the https://aaron.kr/content/code/move-wordpress-media-uploads-to-a-subdomain/