WP Offload Media - Local doesn't pull Storage Provider info

Local site doesn’t do URL rewriting to fetch offloaded media


My production site has media files offloaded to Google Cloud Storage (GCS) using WP Offload Media.

After pulling the site from Flywheel into Local, WP Offload Media has lost the Storage Provider settings and no URL rewriting is being done, thus, no local access to any of the offloaded cloud media.

When I start to set the provider to GCS on the local site, it warns me that I have thousands of offloaded media files that should be removed before proceeding. No way! I don’t want to risk messing up the production site.

Any advice on how to use Local when my production media is offloaded with WP Offload Media? Editing a media-rich website with no media files is a show-stopper for using Local.

Thanks.

Hi @MichaelB!

The expected behavior would be for the offloading to continue to work locally, so it seems like something might be amiss here.

Could you provide some more details to help us take a further look from the Local side of things?

  • What is your OS?

  • What version of Local are you on?

  • Please attach a copy of your Local Logs

You can also reach out to the Delicious Brains team for support as well, or consult their documentation here: Contact Us

Keep us posted and we’d be happy to help further!

Hi @Nick-B,

OS is WIndows 11 Pro, build 26100. I regularly install latest updates and patches.

Local is version 9.2.9 - I just installed it for the first time last week.

Local logs are attached.

Looking at the WP Offload Media settings on the local site, I see it’s complaining about the Storage and Delivery settings. Attached are screen shots from the production (Flywheel) and Local plugins.

So it seems that something didn’t get set up properly when I did the “Pull” from Flywheel.

If I start to Edit the storage provider on the Local site, I get a warning that says:

image

which scares me as I don’t want to break the production site. Any insights appreciated!

Hi @MichaelB!

I reached out to our friends at Delicious Brains, and they’d like to help you further if you want to reach out to them directly for more support. There should be a Help tab inside the plugin’s UI, where you can get that started and share logs. Here is the full response from one of the DB Devs with some more information as well:

It should be fine to work with Local. It’s likely that the configuration and access keys in wp-config on the production site are not copied to Local.
:warning: HOWEVER: The customer will probably not want to copy all of the settings from production over. It’s likely that they want to remove the access keys so that their development site doesn’t delete or overwrite any media (as they have correctly identified).
This article explains: Strategies for Handling Large WordPress Media Libraries in Dev and Staging Environments
I would start by getting them to open a ticket with support and making sure the diagnostic info from the “Support” tab of the Offload Media settings is sent through. Once the ticket is open, have them send the diagnostics from the other site so that we have both.
DO NOT have the diagnostic info posted to the Local forums as it contains sensitive information about the customer site

1 Like

Thank you - I’ll pick this up with them.

1 Like

If you have any other questions or concerns regarding Local afterward, don’t hesitate to reach back out. We are always happy to help!

Just for the sake of anyone in the future with this problem: There is a simple solution. Apparently, when Local ‘pulls’ a site that is using WP Offload Media, configured with Google Cloud Storage as the cloud service, from Flywheel - the ‘pull’ does not include the AS3CF_SETTINGS constants defined in the wp-config.php file.

Dropping the following code in my local wp-config.php file was enough to get the offloaded media to appear in the local site:

define( ‘AS3CF_SETTINGS’, serialize( array(
‘provider’ => ‘gcp’,
) ) );

This connects the local site’s WP Offload Media plugin to Google Cloud Storage for fetching offloaded media. It does not allow the local site to modify GCS in any way which is good for me - the production system is ‘safe.’

The support people raised a flag that I’ll include below:

“Please be careful if you migrate your local site back to production, particularly the Media Library records in the posts table and the as3cf_items table, as the plugin relies on those records. More about offload data here: https://deliciousbrains.com/wp-offload-media/doc/developer-guide/#automatic-offload-data

So…to be safe, whenever I push the local site back to production, I’m only pushing specific files that I’ve modified. Hope this helps someone, some day.

2 Likes

Thank you so much for coming back and sharing that here @MichaelB! :green_heart:

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.