How to Change Default File URL for Media
-
wardencenter asked : How do I change the default File URL that WordPress assigns to images in the Media Library, please?
He then resolved it by placing this code in his themes function.php
update_option(‘upload_url_path’, ‘/wp-content/uploads’);
I created a sub domain and duplicated my site to it for testing. It copied all the media files there by doubling my disk usage.
Using his trick I pointed all the imagine links on the test site back to the main site and was able to delete all the redundant images.
update_option(‘upload_url_path’, ‘https://MYSITENAME.COM/wp-content/uploads’);
The page I need help with: [log in to see the link]
- The topic ‘How to Change Default File URL for Media’ is closed to new replies.