Skip to content

Backgrounds

How-to Guides

Technical References

Migrate content: Media

To migrate content onto VIP Go, we need two assets:

  1. The WordPress database file as a SQL dump.
  2. The media as a compressed archive.

Files to import can be attached to a Zendesk ticket — or files larger than 20 MB can be transferred via sending us a web-accessible link to the files (e.g., https://www.mysite.com/uploads.tar.gz). You may also use Amazon S3, Dropbox, Box, WeTransfer, or another similarly secure service. Please also be sure to include the domain name of the VIP Go environment the import is for.

Exporting media

WordPress stores its media in /wp-content/uploads/ (or whatever directory is specified in your database’s uploads constant). This directory should be named “uploads”, and it can be provided as a ZIP or tarball file to VIP for import.

If you are importing media into a multisite, note that subsite number 1’s media are found in the /wp-content/uploads folder — but all subsequent sites in the network will be in the /wp-content/uploads/sites/ folder, in their own subfolder based on the site number, as designated by the database. For example, a specific file would be found in /wp-content/uploads/sites/{SITE ID}/{YEAR}/{MONTH}/{FILE NAME}, where the site ID would not have any leading 0’s (e.g., use 2, not 02).

We expect your archive to decompress to an /uploads/ folder with only the media required for your site(s).

Media may only be imported to a production environment and does not need to be imported into your development environment separately. All files uploaded to production are immediately made available to the child environments as well.

Preparing media

Special characters in filenames

WordPress will rename files containing these special characters upon upload to the media library~?,[]/\=<>:;'\&$#*()|~`!{}%+ and whitespace ().

However, for media file imports, all special characters are allowed, such as: spaces ( ) [ ] ~ + & # % = ' ” \ < > : ; , / ? $ * | ` ! { } . Encoded or alternate whitespace, such as %20or + will be converted to proper spaces during the import.

Intermediate images

By default, WordPress creates intermediate images, or smaller versions of each uploaded image. VIP does not require these files, as our filesystem generates and caches images of any dimensions on request, reducing the amount of storage your site requires and providing image size flexibility at no loss of speed. You may exclude these intermediate images from your export, though if provided, they will be skipped during the import process.

Unsupported file types

Files with an *.webp or *.svg extension are not included in WordPress Core’s list of mime types and file extensions. If your media import contains files with the *.webp file extension, or files with alternative extensions but webp mime type, those files will not work with our File System as expected.

VIP Go will automatically convert and serve all images as next-gen formats to compatible browsers, including WebP. As such, there is no need to upload WebP files or directly reference them in your theme. Any unique WebP files should be converted to JPG or PNG before import, and all references to *.webp files in the content should be changed prior to database import.

SVG files allow embedded JavaScript, which can pose a security risk. We recommend that you scan SVGs that are in your media library already – either manually, or use a tool such as http://svg.enshrined.co.uk/ or https://github.com/Automattic/vip-go-svg-sanitizer prior to your media import.

Submitting media

Please open a new Zendesk ticket when sending files for import. Files to be imported can be transferred via sending us a web-accessible link to the files (e.g., https://www.example.com/uploads.tar.gz). You may also use Amazon S3, Dropbox, Box, WeTransfer, Firefox Send, or another similar service.

We can also stream media into VIP’s filesystem directly from an AWS bucket. To use this method:

  1. You need to provide an AWS key and secret in the VIP support ticket. You can use a secure method, such as Quickforget.com to send those credentials to VIP support.
  2. The media needs to be located in a directory with /uploads/ in the path.

Last updated: May 02, 2021