Change media upload URL, but only for wp-admin
-
Love using Cloudflare, but one of the limitations is that they restrict upload file sizes to 100MB and I need to have users be able to upload larger files. The workaround I’ve been using is to change wp-admin to be a subdomain (bypass.fxg.com) and bypass this subdomain on CloudFlare. This way, the limit doesn’t apply. Through mod_rewrite, the subdomain is actually the same WordPress install…same directory, files, etc…just the url is different.
That works pretty well, but does end up breaking some plugins, especially caching ones (since they “think” the site is bypass.fxg.com and not https://www.fxg.com).
So what i’d like to try is to move the admin back to https://www.fxg.com, and “simply” change the URL for the uploader to be “bypass.fxg.com”. This way, files would get automatically uploaded via bypass and not be limited. And files on the site for users would still come from https://www.fxg.com.
In 3.5 you can still hook into upload_url_path, but then this changes where the files are served from.
So is there a hook somewhere in admin where you can change the upload url — and only have it impact the upload functionality? And not change the URL that is stored, etc?
Or maybe a fancy redirect on the upload if I can figure out the URL used….
Thanks for any insight….
- The topic ‘Change media upload URL, but only for wp-admin’ is closed to new replies.