linuxfoundation / lfevents

For the Linux Foundation Events website events.linuxfoundation.org
MIT License
20 stars 4 forks source link

Remove hardcoded LMFP URL from wp-config.php #934

Closed thetwopct closed 3 days ago

thetwopct commented 3 weeks ago

We currently have this in wp-config.php

define( 'LOAD_MEDIA_FROM_PRODUCTION_URL', 'https://events.linuxfoundation.org/' ); // Sets url for loading media files on dev instance.

This makes it difficult/impossible to test locally when you want to sync images from a PR instance instead of the main site.

Suggest the constant is removed.

If it needs to be added somewhere (although I don't see where this is useful apart from local development, where it should be down to the developer to apply it or not) a WP CLI command can be added to deployment process, composer install, or lando setup.

wp load-media-from-production set "https://production-url.com"

or worse case setting the option directly

wp option update lmfp_production_url "https://new-production-url.com"
cjyabraham commented 3 weeks ago

Noting here that the constant can also be set in the LMFP settings page: https://lfeventsci.lndo.site/wp/wp-admin/options-general.php?page=load-media-from-production

cjyabraham commented 3 days ago

Deployed