WP Stagecoach has been acquired by the WP Masters! Please visit this page for more information.

Images missing on staging site

A common issue for WP Stagecoach users is that images are missing on the staging site.

WP Stagecoach doesn’t actually copy the images from your live site to the staging site – instead, it hotlinks to the images on the live site.

Some plugins and themes use file paths instead of URLs. If that is the case, they won’t be able to find the hotlinked images, and the images will not appear on the staging site.

There are two options to make the images work on your staging site:

  1. Use SFTP to manually copy the images from your live site to your staging site.
  2. Delete your staging site, and re-create it without hotlinking. To do that, on your live site go to WP Stagecoach –> Settings, and check the box next to “Enable Advanced Options.” Then, go to the WP Stagecoach page, and you will see an option for “Don’t hotlink images from staging site to live site.” Check the box next to that, and then create your staging site. If your site has a lot of images, it might take a really long time to create the staging site, and it’s possible that the process will time out and not work.

Note: The Single-Site plan does not allow you to turn off hotlinking.

JetPack’s Photon
If you are using JetPack’s Photon feature to speed up the loading of images, the steps above will not help. You need to turn off Photon, create a staging site, and then you can turn Photon back on.

When Photon is on, your image URLs are not on your site, but are on Photon’s site.  The image URLs are all like this:
http://i2.wp.com/example.wpstagecoach.com/wp-content/uploads/maxresdefault4-e1431062893261.jpg?resize=70%2C53
When WP Stagecoach creates your site, it goes through the entire database and replaces all instances of your live URL (example.com) with your staging URL (example.wpstagecoach.com). The image URLs get changed too: so in this case, the image URLs have all been changed to i2.wp.com/example.wpstagecoach.com when they should be i2.wp.com/example.  The new URLs don’t work, so your images don’t appear on your site.  Turning off Photon just before you create a staging site circumvents this issue.