Cliff Seal
Member
Posted 2 months ago #
I've got an install at http://localhost:8888/whatever, and the domain I need to pull from is http://sub.domain.com.
I've got the plugin activated (obviously), add define('UBP_LIVE_DOMAIN', 'sub.domain.com');, and have even tried adding define('UBP_IS_LOCAL', true);.
So, then, nothing happens, so far as I can tell. The main problem is I'm not sure how to debug what's actually happening. Any ideas?
http://wordpress.org/extend/plugins/uploads-by-proxy/
Do you have permalinks enabled? They are required for WordPress (and the plugin) to intercept image 404's.
One quick way to test this is by going to http://localhost:8888/something-that-doesnt-exist. If you get a WordPress 404 template, then that's working fine. If you get a server/apache 404, then you need to enable permalinks under Settings > Permalinks by selecting any option and clicking "save". This should save .htaccess and enable the plugin.
Cliff Seal
Member
Posted 2 months ago #
Permalinks are enabled on both the local and remote installs.
Here's an example setup:
I've pulled all the recent files (except for uploads) and database to a local install at http://localhost:8888/logos. The remote version is at http://logos-creative.com. I've got images loading that exist remotely, but not locally, and don't load even though I've defined define('UBP_LIVE_DOMAIN', 'logos-creative.com'); and activated the plugin.
I've worked out that this is caused by the local version being installed in a subdirectory, but the live version being at the root directory.
I'm looking at solutions now, trying to work out the different possibilities:
- Local in subdirectory, live in root (and how to catch 404s in this case)
- Local in root, live in subdirectory
This should be resolved now in version 1.1. Go ahead and give it a try through the WordPress updater.
Here's the full changelog.
Cliff Seal
Member
Posted 2 months ago #
Looks like that fixed it for me, Paul! Thanks so much.