How to move media to a subdomain

  1. Create the subdomain on your host files.sitename.com for example
  2. Download ALL the old media files from your WordPress /wp-content/uploads folder via FTP
  3. Upload ALL the media files to your new subdomain
  4. 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
  • upload_url_path : actual URL path for the subdomain
    • Mine is https://files.sitename.com/media

Change your Live Image URLs with velvet blue plugin

Taken from the https://aaron.kr/content/code/move-wordpress-media-uploads-to-a-subdomain/